diff --git a/README.md b/README.md index 7ef867d..5b7dbe1 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ cntb create image --name 'CentOS Cloud Image' --description 'CentOS 7 Cloud Imag Using Cloud-Init to set ssh public key ```sh -cntb create instance --imageId "ae423751-50fa-4bf6-9978-015673bf51c4" --productId "V1" --region "EU" --userData 'ssh_authorized_keys: +cntb create instance --imageId "ae423751-50fa-4bf6-9978-015673bf51c4" --productId "V45" --region "EU" --userData 'ssh_authorized_keys: - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEA3FSyQwBI6Z+nCSjUUk8EEAnnkhXlukKoUPND/RRClWz2s5TCzIkd3Ou5+Cyz71X0XmazM3l5WgeErvtIwQMyT1KjNoMhoJMrJnWqQPOt5Q8zWd9qG7PBl9+eiH5qV7NZ' # once finished please login via ssh # in case of the previously uploaded CentOS 7 Cloud Image please use `centos` as user @@ -54,7 +54,7 @@ cntb create instance --imageId "ae423751-50fa-4bf6-9978-015673bf51c4" --productI Using Cloud-Init to install apache2 with an already stored SSH public key ```sh -cntb create instance --imageId "ae423751-50fa-4bf6-9978-015673bf51c4" --productId "V1" --region "EU" --sshKeys '1,2' --userData 'package_update: true +cntb create instance --imageId "ae423751-50fa-4bf6-9978-015673bf51c4" --productId "V45" --region "EU" --sshKeys '1,2' --userData 'package_update: true package_upgrade: true packages: - httpd' diff --git a/cmd/instances/create.go b/cmd/instances/create.go index d285f70..928a954 100644 --- a/cmd/instances/create.go +++ b/cmd/instances/create.go @@ -21,7 +21,7 @@ var instanceCreateCmd = &cobra.Command{ Short: "Create a new compute instance.", Long: `Create a new compute instance.`, Example: `create instance -p 12 --imageId "111eebb0-dc70-4bc2-a7d0-c525dbe016a9" ` + - `--license "PleskHost" --productId "V1" -r "EU"`, + `--license "PleskHost" --productId "V45" -r "EU"`, Run: func(cmd *cobra.Command, args []string) { createInstanceRequest := *instancesClient.NewCreateInstanceRequestWithDefaults() content := contaboCmd.OpenStdinOrFile() @@ -30,7 +30,7 @@ var instanceCreateCmd = &cobra.Command{ case nil: // flags with default values createInstanceRequest.ImageId = &createInstanceImageId - createInstanceRequest.ProductId = createInstanceProductId + createInstanceRequest.ProductId = &createInstanceProductId createInstanceRequest.Region = &createInstanceRegion createInstanceRequest.Period = createInstancePeriod createInstanceRequest.DisplayName = &createInstanceDisplayName @@ -127,7 +127,7 @@ func init() { instanceCreateCmd.Flags().StringVar(&createInstanceImageId, "imageId", "db1409d2-ed92-4f2f-978e-7b2fa4a1ec90", `Standard or custom image id. Defaults to 'Ubuntu 20.04'.`) - instanceCreateCmd.Flags().StringVar(&createInstanceProductId, "productId", "V1", + instanceCreateCmd.Flags().StringVar(&createInstanceProductId, "productId", "V45", `Id of product to be used. See https://contabo.com/en/product-list/?show_ids=true`) instanceCreateCmd.Flags().StringVarP(&createInstanceRegion, "region", "r", "EU", diff --git a/cmd/users/update.go b/cmd/users/update.go index 25953ec..4821f0b 100644 --- a/cmd/users/update.go +++ b/cmd/users/update.go @@ -19,8 +19,8 @@ import ( var userUpdateCmd = &cobra.Command{ Use: "user [userId]", - Short: "Updates a specific user", - Long: `Updates the specific user details`, + Short: "Updates a specific tag", + Long: `Updates the specific tag by setting new values either by file input or flags / environment variables`, Run: func(cmd *cobra.Command, args []string) { updateUserRequest := *userManagementClient.NewUpdateUserRequestWithDefaults() content := contaboCmd.OpenStdinOrFile() diff --git a/openapi/.openapi-generator/FILES b/openapi/.openapi-generator/FILES index 2d69e74..292bcee 100644 --- a/openapi/.openapi-generator/FILES +++ b/openapi/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml @@ -24,6 +23,7 @@ api_tag_assignments.go api_tag_assignments_audits.go api_tags.go api_tags_audits.go +api_tickets.go api_users.go api_users_audits.go client.go @@ -157,8 +157,10 @@ docs/ListSnapshotResponse.md docs/ListSnapshotsAuditResponse.md docs/ListTagAuditsResponse.md docs/ListTagResponse.md +docs/ListTicketMetadataResponse.md docs/ListUserAuditResponse.md docs/ListUserResponse.md +docs/MetadataType.md docs/MinimumRequirements.md docs/ObjectStorageAuditResponse.md docs/ObjectStorageResponse.md @@ -208,6 +210,10 @@ docs/TagResponse.md docs/TagResponse1.md docs/TagsApi.md docs/TagsAuditsApi.md +docs/TicketCreateRequest.md +docs/TicketCreateResponse.md +docs/TicketResponse.md +docs/TicketsApi.md docs/UnassignInstancePrivateNetworkResponse.md docs/UpdateCustomImageRequest.md docs/UpdateCustomImageResponse.md @@ -358,8 +364,10 @@ model_list_snapshot_response.go model_list_snapshots_audit_response.go model_list_tag_audits_response.go model_list_tag_response.go +model_list_ticket_metadata_response.go model_list_user_audit_response.go model_list_user_response.go +model_metadata_type.go model_minimum_requirements.go model_object_storage_audit_response.go model_object_storage_response.go @@ -395,6 +403,9 @@ model_tag_assignment_self_links.go model_tag_audit_response.go model_tag_response.go model_tag_response1.go +model_ticket_create_request.go +model_ticket_create_response.go +model_ticket_response.go model_unassign_instance_private_network_response.go model_update_custom_image_request.go model_update_custom_image_response.go diff --git a/openapi/README.md b/openapi/README.md index 20e7fe7..74f0121 100644 --- a/openapi/README.md +++ b/openapi/README.md @@ -357,6 +357,8 @@ Class | Method | HTTP request | Description *TagsApi* | [**RetrieveTagList**](docs/TagsApi.md#retrievetaglist) | **Get** /v1/tags | List tags *TagsApi* | [**UpdateTag**](docs/TagsApi.md#updatetag) | **Patch** /v1/tags/{tagId} | Update specific tag by id *TagsAuditsApi* | [**RetrieveTagAuditsList**](docs/TagsAuditsApi.md#retrievetagauditslist) | **Get** /v1/tags/audits | List history about your assignments (audit) +*TicketsApi* | [**CreateSupportTicket**](docs/TicketsApi.md#createsupportticket) | **Post** /v1/tickets | Create a new support ticket +*TicketsApi* | [**RetrieveTicketMetadata**](docs/TicketsApi.md#retrieveticketmetadata) | **Get** /v1/tickets/metadata | Retrieve ticket metadata *UsersApi* | [**CreateUser**](docs/UsersApi.md#createuser) | **Post** /v1/users | Create a new user *UsersApi* | [**DeleteUser**](docs/UsersApi.md#deleteuser) | **Delete** /v1/users/{userId} | Delete existing user by id *UsersApi* | [**GenerateClientSecret**](docs/UsersApi.md#generateclientsecret) | **Put** /v1/users/client/secret | Generate new client secret @@ -496,8 +498,10 @@ Class | Method | HTTP request | Description - [ListSnapshotsAuditResponse](docs/ListSnapshotsAuditResponse.md) - [ListTagAuditsResponse](docs/ListTagAuditsResponse.md) - [ListTagResponse](docs/ListTagResponse.md) + - [ListTicketMetadataResponse](docs/ListTicketMetadataResponse.md) - [ListUserAuditResponse](docs/ListUserAuditResponse.md) - [ListUserResponse](docs/ListUserResponse.md) + - [MetadataType](docs/MetadataType.md) - [MinimumRequirements](docs/MinimumRequirements.md) - [ObjectStorageAuditResponse](docs/ObjectStorageAuditResponse.md) - [ObjectStorageResponse](docs/ObjectStorageResponse.md) @@ -533,6 +537,9 @@ Class | Method | HTTP request | Description - [TagAuditResponse](docs/TagAuditResponse.md) - [TagResponse](docs/TagResponse.md) - [TagResponse1](docs/TagResponse1.md) + - [TicketCreateRequest](docs/TicketCreateRequest.md) + - [TicketCreateResponse](docs/TicketCreateResponse.md) + - [TicketResponse](docs/TicketResponse.md) - [UnassignInstancePrivateNetworkResponse](docs/UnassignInstancePrivateNetworkResponse.md) - [UpdateCustomImageRequest](docs/UpdateCustomImageRequest.md) - [UpdateCustomImageResponse](docs/UpdateCustomImageResponse.md) diff --git a/openapi/api/openapi.yaml b/openapi/api/openapi.yaml index d852c51..55ba510 100644 --- a/openapi/api/openapi.yaml +++ b/openapi/api/openapi.yaml @@ -343,14 +343,13 @@ tags: and ssh-keys. Usage of the Secret Management API is purely optional. As a convenience feature e.g. it allows you to reuse SSH-keys easily. name: Secrets Audits +- description: Tickets API + name: Tickets paths: - /v1/compute/instances/{instanceId}/actions/start: - post: - description: Starting a compute instance / resource is like powering on a real - server. If the compute instance / resource is already started nothing will - happen. You may check the current status anytime when getting information - about a compute instance / resource. - operationId: start + /v1/users: + get: + description: List and filter all your users. + operationId: retrieveUserList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -372,39 +371,92 @@ paths: schema: type: string style: simple - - description: The identifier of the compute instance / resource to be started - in rescue mode. - example: 12345 - explode: false - in: path - name: instanceId - required: true + - description: Number of page to be fetched. + example: 1 + explode: true + in: query + name: page + required: false schema: format: int64 type: integer - style: simple + style: form + - description: Number of elements per page. + example: 10 + explode: true + in: query + name: size + required: false + schema: + format: int64 + type: integer + style: form + - description: Specify fields and ordering (ASC for ascending, DESC for descending) + in following format `field:ASC|DESC`. + example: name:asc + explode: true + in: query + name: orderBy + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter as substring match for user emails. + example: john.doe@example.com + explode: true + in: query + name: email + required: false + schema: + type: string + style: form + - description: Filter if user is enabled or not. + example: "true" + explode: true + in: query + name: enabled + required: false + schema: + type: boolean + style: form + - description: Filter if user is owner or not. + example: "true" + explode: true + in: query + name: owner + required: false + schema: + type: boolean + style: form responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/InstanceStartActionResponse' - description: Information of started instance + $ref: '#/components/schemas/ListUserResponse' + description: The response will be a JSON object and contains a paginated + list of users. security: - bearer: [] - summary: Start a compute instance / resource identified by its id + summary: List users tags: - - Instance Actions + - Users x-codeSamples: - lang: cURL - source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/start"' + source: 'curl -X GET ''https://api.contabo.com/v1/users'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb start instance 1234 - /v1/compute/instances/{instanceId}/actions/restart: + source: cntb get users post: - description: List of your custom images history, with the ability to apply filters. - operationId: restart + description: Create a new user with required attributes name, email, enabled, + totp (=Two-factor authentication 2FA), admin (=access to all endpoints and + resources), accessAllResources and roles. You can't specify any password / + secrets for the user. For security reasons the user will have to specify secrets + on his own. + operationId: createUser parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -426,44 +478,41 @@ paths: schema: type: string style: simple - - description: The identifier of the compute instance / resource to be started - in rescue mode. - example: 12345 - explode: false - in: path - name: instanceId + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserRequest' required: true - schema: - format: int64 - type: integer - style: simple responses: "201": content: application/json: schema: - $ref: '#/components/schemas/InstanceRestartActionResponse' - description: Information of restarted instance + $ref: '#/components/schemas/CreateUserResponse' + description: The response will be a JSON object and contains standard user + attributes. security: - bearer: [] - summary: Retrieve a list of your custom images history. + summary: Create a new user tags: - - Instance Actions + - Users x-codeSamples: - lang: cURL - source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/restart"' + source: 'curl -X POST ''https://api.contabo.com/v1/users'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{ + "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", + "enabled": true, "totp": false, "locale": "en", "roles": [2]}''' - lang: cntb CLI - source: cntb restart instance 1234 - /v1/compute/instances/{instanceId}/actions/stop: - post: - description: Stopping a compute instance / resource is like powering off a real - server. So please be aware that data may be lost. Alternatively you may log - in and shut your compute instance / resource gracefully via the operating - system. If the compute instance / resource is already stopped nothing will - happen. You may check the current status anytime when getting information - about a compute instance / resource. - operationId: stop + source: cntb create user --firstName John --lastName Doe --email john.doe@example.com + --enabled --locale en --roles 2 + /v1/users/{userId}: + delete: + description: By deleting a user he will not be able to access any endpoints + or resources any longer. In order to temporarily disable a user please update + its `enabled` attribute. + operationId: deleteUser parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -485,41 +534,34 @@ paths: schema: type: string style: simple - - description: The identifier of the compute instance / resource to be started - in rescue mode. - example: 12345 + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 explode: false in: path - name: instanceId + name: userId required: true schema: - format: int64 - type: integer + type: string style: simple responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/InstanceStopActionResponse' - description: Information of stoped instance + "204": + description: Response body has no content security: - bearer: [] - summary: Stop compute instance / resource by its id + summary: Delete existing user by id tags: - - Instance Actions + - Users x-codeSamples: - lang: cURL - source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/stop"' + source: 'curl -X DELETE ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' - lang: cntb CLI - source: cntb stop instance 1234 - /v1/compute/instances/{instanceId}/actions/shutdown: - post: - description: Shutdown an compute instance / resource. This is similar to pressing - the power button on a physical machine. This will send an ACPI event for the - guest OS, which should then proceed to a clean shutdown. - operationId: shutdown + source: cntb delete user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + get: + description: Get attributes for a specific user. + operationId: retrieveUser parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -541,44 +583,41 @@ paths: schema: type: string style: simple - - description: The identifier of the compute instance / resource to be started - in rescue mode. - example: 12345 + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 explode: false in: path - name: instanceId + name: userId required: true schema: - format: int64 - type: integer + type: string style: simple responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/InstanceShutdownActionResponse' - description: Information of a shutdown instance + $ref: '#/components/schemas/FindUserResponse' + description: The response will be a JSON object and contains standard user + attributes. security: - bearer: [] - summary: Shutdown compute instance / resource by its id + summary: Get specific user by id tags: - - Instance Actions + - Users x-codeSamples: - lang: cURL - source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/shutdown"' + source: 'curl -X GET ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' - lang: cntb CLI - source: cntb shutdown instance 1234 - /v1/compute/instances/{instanceId}/actions/rescue: - post: - description: You can reboot your instance in rescue mode to resolve system issues. - Rescue system is Linux based and its booted instead of your regular operating - system. The disk containing your operating sytstem, software and your data - is already mounted for you to access and repair/modify files. After a reboot - your compute instance will boot your operating system. Please note that this - is for advanced users. - operationId: rescue + source: cntb get user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + patch: + description: Update attributes of a user. You may only specify the attributes + you want to change. If an attribute is not set, it will retain its original + value. + operationId: updateUser parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -600,71 +639,47 @@ paths: schema: type: string style: simple - - description: The identifier of the compute instance / resource to be started - in rescue mode. - example: 12345 + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 explode: false in: path - name: instanceId + name: userId required: true schema: - format: int64 - type: integer + type: string style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/InstancesActionsRescueRequest' + $ref: '#/components/schemas/UpdateUserRequest' required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/InstanceRescueActionResponse' - description: Information of rescued instance + $ref: '#/components/schemas/UpdateUserResponse' + description: The response will be a JSON object and contains standard user + attributes. security: - bearer: [] - summary: Rescue a compute instance / resource identified by its id + summary: Update specific user by id tags: - - Instance Actions + - Users x-codeSamples: - lang: cURL - source: "curl -X POST \"https://api.contabo.com/v1/compute/instances/1234/actions/rescue\"\ - \ -H \"Authorization: Bearer ${ACCESS_TOKEN}\" -H \"x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31\"\ - \ -H \"x-trace-id: 123213\" -d '{\"sshKeys\": [1,2], \"rootPassword\": 12,\ - \ \"userData\": \"#cloud-config\n user: root\n ssh_pwauth: true\n disable_root:\ - \ false\n ssh_authorized_keys:\n - \n chpasswd:\n list:\n - root:\ - \ \n expire: False\n\"}'" + source: 'curl -X PATCH ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213'' -d ''{"enabled":true,"roles":[1,2,3]}''' - lang: cntb CLI - source: |- - cntb rescue instance 1234 --sshKeys "1,2" --rootPassword 12 --userData '#cloud-config - - - - - - - - - - - - - - - user: root - ssh_pwauth: true - disable_root: false - ssh_authorized_keys: - - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL6Bja3wXjkpxkGrNkBqcb/WeRlWO33XWnKHS/Uf9lmH testKey' - /v1/compute/instances/{instanceId}/actions/resetPassword: + source: cntb update user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 --enabled --roles + 1 + /v1/users/{userId}/reset-password: post: - description: Reset password for a compute instance / resource referenced by - an id. This will reset the current password to the password that you provided - in the body of this request. - operationId: resetPasswordAction + description: Send reset password email for a specific user + operationId: resetPassword parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -686,51 +701,43 @@ paths: schema: type: string style: simple - - description: The identifier of the compute instance / resource to be started - in rescue mode. - example: 12345 + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 explode: false in: path - name: instanceId + name: userId required: true schema: - format: int64 - type: integer + type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InstancesResetPasswordActionsRequest' - required: true + - description: The redirect url used for resetting password + example: https://test.contabo.de + explode: true + in: query + name: redirectUrl + required: false + schema: + type: string + style: form responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/InstanceResetPasswordActionResponse' - description: Information of an instance password reset + "204": + description: Response body has no content security: - bearer: [] - summary: Reset password for a compute instance / resource referenced by an id + summary: Send reset password email tags: - - Instance Actions + - Users x-codeSamples: - lang: cURL - source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/resetPassword" - -d ''{"sshKeys": [1,2], "rootPassword": 12, "userData": "''#cloud-config\nuser: - root\nssh_pwauth: true\ndisable_root: false\nssh_authorized_keys:\n - \nchpasswd:\n list:\n - - root: \n expire: False\n''"}''' + source: 'curl -X POST ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/reset-password'' + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' + -H ''x-trace-id: 123213''' - lang: cntb CLI - source: "cntb resetPassword instance 1234 --sshKeys \"1,2\" --rootPassword\ - \ 12 --userData \"#cloud-config\n user: root\n ssh_pwauth: true\n disable_root:\ - \ false\n ssh_authorized_keys:\n - \n chpasswd:\n list:\n - root:\ - \ \n expire: False\n\"" - /v1/compute/instances: - get: - description: List and filter all instances in your account - operationId: retrieveInstancesList + source: cntb resetPassword user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + /v1/users/{userId}/resend-email-verification: + post: + description: Resend email verification for a specific user + operationId: resendEmailVerification parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -752,181 +759,294 @@ paths: schema: type: string style: simple - - description: Number of page to be fetched. - example: 1 - explode: true - in: query - name: page - required: false - schema: - format: int64 - type: integer - style: form - - description: Number of elements per page. - example: 10 - explode: true - in: query - name: size - required: false - schema: - format: int64 - type: integer - style: form - - description: Specify fields and ordering (ASC for ascending, DESC for descending) - in following format `field:ASC|DESC`. - example: name:asc - explode: true - in: query - name: orderBy - required: false - schema: - items: - type: string - type: array - style: form - - description: The name of the instance - example: vmd12345 - explode: true - in: query - name: name - required: false + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + explode: false + in: path + name: userId + required: true schema: type: string - style: form - - description: The display name of the instance - example: myTestInstance + style: simple + - description: The redirect url used for email verification + example: https://test.contabo.de explode: true in: query - name: displayName + name: redirectUrl required: false schema: type: string style: form - - description: The data center of the instance - example: European Union (Germany) 1 - explode: true - in: query - name: dataCenter - required: false + responses: + "204": + description: Response body has no content + security: + - bearer: [] + summary: Resend email verification + tags: + - Users + x-codeSamples: + - lang: cURL + source: 'curl -X POST ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/resend-email-verification'' + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' + -H ''x-trace-id: 123213''' + - lang: cntb CLI + source: cntb resendEmailVerification user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + /v1/users/client: + get: + description: Get idm client. + operationId: retrieveUserClient + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ type: string - style: form - - description: The Region of the instance - example: EU - explode: true - in: query - name: region + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id required: false schema: type: string - style: form - - deprecated: true - description: The identifier of the instance (deprecated) - example: 100 - explode: true - in: query - name: instanceId - required: false + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FindClientResponse' + description: The response will be a JSON object and contains standard client + attributes. + security: + - bearer: [] + summary: Get client + tags: + - Users + x-codeSamples: + - lang: cURL + source: 'curl -X GET ''https://api.contabo.com/v1/users/client'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' + /v1/users/client/secret: + put: + description: Generate and get new client secret. + operationId: generateClientSecret + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true schema: - format: int64 - type: integer - style: form - - description: Comma separated instances identifiers - example: 100, 101, 102 - explode: true - in: query - name: instanceIds + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id required: false schema: type: string - style: form - - description: The status of the instance - example: provisioning,installing - explode: true + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateClientSecretResponse' + description: The response will be a JSON object and contains new client + secret. + security: + - bearer: [] + summary: Generate new client secret + tags: + - Users + x-codeSamples: + - lang: cURL + source: 'curl -X PUT ''https://api.contabo.com/v1/users/client/secret'' -H + "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' + -H ''x-trace-id: 123213''' + - lang: cntb CLI + source: cntb generateSecret user + /v1/users/is-password-set: + get: + description: Get info about idm user if the password is set. + operationId: retrieveUserIsPasswordSet + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + - description: The user ID for checking if password is set for him + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + explode: true in: query - name: status + name: userId required: false schema: - enum: - - provisioning - - uninstalled - - running - - stopped - - error - - installing - - unknown - - manual_provisioning - - product_not_available - - verification_required - - rescue - - pending_payment - - other type: string style: form - - description: Identifiers of Addons the instances have - example: 1044,827 + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FindUserIsPasswordSetResponse' + description: The response will be a JSON object and contains standard user + attributes. + security: + - bearer: [] + summary: Get user is password set status + tags: + - Internal + /v1/roles: + get: + description: List and filter all your roles. A role allows you to specify permission + to api endpoints and resources like compute. + operationId: retrieveRoleList + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + - description: Number of page to be fetched. + example: 1 explode: true in: query - name: addOnIds + name: page + required: false + schema: + format: int64 + type: integer + style: form + - description: Number of elements per page. + example: 10 + explode: true + in: query + name: size + required: false + schema: + format: int64 + type: integer + style: form + - description: Specify fields and ordering (ASC for ascending, DESC for descending) + in following format `field:ASC|DESC`. + example: name:asc + explode: true + in: query + name: orderBy + required: false + schema: + items: + type: string + type: array + style: form + - description: The name of the role + example: Web + explode: true + in: query + name: name required: false schema: type: string style: form - - description: Comma separated instance's category depending on Product Id - example: ssd, hdd, nvme + - description: The name of api + example: /v1/compute/instances explode: true in: query - name: productTypes + name: apiName required: false schema: type: string style: form - - description: Filter instances that have an ip config - example: true + - description: The name of the tag + example: Web explode: true in: query - name: ipConfig + name: tagName required: false schema: - type: boolean + type: string + style: form + - description: The type of the tag. Can be either `default` or `custom` + example: custom + explode: true + in: query + name: type + required: false + schema: + type: string style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ListInstancesResponse' + $ref: '#/components/schemas/ListRoleResponse' description: The response will be a JSON object and contains a paginated - list of instances. + list of roles. security: - bearer: [] - summary: List instances + summary: List roles tags: - - Instances + - Roles x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: 123213''' + source: 'curl -X GET ''https://api.contabo.com/v1/roles'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb get instances + source: cntb get roles post: - description: Create a new instance for your account with the provided parameters.
ProductIdProductDisk - Size
V41VPS XS SSD100 GB SSD
V40VPS - XS NVME35 GB NVMe
V1VPS S SSD200 - GB SSD
V35VPS S Storage400 GB - SSD
V12VPS S NVMe50 GB NVMe
V2VPS - M SSD400 GB SSD
V36VPS M Storage800 - GB SSD
V13VPS M NVMe100 GB NVMe
V3VPS - L SSD800 GB SSD
V37VPS L Storage1600 - GB SSD
V14VPS L NVMe200 GB NVMe
V4VPS - XL SSD1600 GB SSD
V38VPS XL - SSD3200 GB SSD
V15VPS XL NVMe400 - GB NVMe
V8VDS S180 GB NVMe
V9VDS - M240 GB NVMe
V10VDS L360 - GB NVMe
V11VDS XL480 GB NVMe
V16VDS - XXL720 GB NVMe
- operationId: createInstance + description: Create a new role. In order to get a list availbale api enpoints + (apiName) and their actions please refer to the GET api-permissions endpoint. + For specifying `resources` please enter tag ids. For those to take effect + please assign them to a resource in the tag management api. + operationId: createRole parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -952,35 +1072,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateInstanceRequest' + $ref: '#/components/schemas/CreateRoleRequest' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/CreateInstanceResponse' - description: The response will be a JSON object and contains standard instance + $ref: '#/components/schemas/CreateRoleResponse' + description: The response will be a JSON object and contains standard role attributes. security: - bearer: [] - summary: Create a new instance + summary: Create a new role tags: - - Instances + - Roles x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances'' -H - "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: - 123213'' -d ''{"region": "EU", "productId": "V1", "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", - "period": 1}''' + source: 'curl -X POST ''https://api.contabo.com/v1/roles'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{"name":"infrastructure","permissions":{ + "apiName": "/v1/compute/instances", "actions": [ "CREATE", "READ" ], "resources": + [1111,2222] } }''' - lang: cntb CLI - source: create instance --period 1 --imageId "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" - --productId "V1" -r "EU" - /v1/compute/instances/{instanceId}: - get: - description: Get attributes values to a specific instance on your account. - operationId: retrieveInstance + source: 'cntb create role --name "infrastructure" --permissions ''[{"apiName" + : "/v1/compute/instances", "actions": ["CREATE", "READ"], "resources": [1111, + 2222]}]''' + /v1/roles/{roleId}: + delete: + description: You can't delete a role if it is still assigned to a user. In such + cases please remove the role from the users. + operationId: deleteRole parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1002,40 +1124,34 @@ paths: schema: type: string style: simple - - description: The identifier of the instance + - description: The identifier of the role example: 12345 explode: false in: path - name: instanceId + name: roleId required: true schema: format: int64 type: integer style: simple responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FindInstanceResponse' - description: The response will be a JSON object and contains standard instance - attributes. + "204": + description: Response body has no content security: - bearer: [] - summary: Get specific instance by id + summary: Delete existing role by id tags: - - Instances + - Roles x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances/12345'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: - 123213''' + source: 'curl -X DELETE ''https://api.contabo.com/v1/roles/12345'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb get instance 12345 - patch: - description: Update specific instance by instanceId. - operationId: patchInstance + source: cntb delete role 12345 + get: + description: Get attributes of specific role. + operationId: retrieveRole parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1057,47 +1173,40 @@ paths: schema: type: string style: simple - - description: The identifier of the instance + - description: The identifier of the role example: 12345 explode: false in: path - name: instanceId + name: roleId required: true schema: format: int64 type: integer style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchInstanceRequest' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/PatchInstanceResponse' - description: The response will be a JSON object and contains instanceId - and createdDate. + $ref: '#/components/schemas/FindRoleResponse' + description: The response will be a JSON object and contains standard role + attributes. security: - bearer: [] - summary: Update specific instance + summary: Get specific role by id tags: - - Instances + - Roles x-codeSamples: - lang: cURL - source: 'curl -X PATCH ''https://api.contabo.com/v1/compute/instances/12345'' - -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: - 123213" -d ''{"displayName": "VPS"}''' + source: 'curl -X GET ''https://api.contabo.com/v1/roles/12345'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb update instance 12345 --displayName "VPS" + source: cntb get role 12345 put: - description: You can reinstall a specific instance with a new image and optionally - add ssh keys, a root password or cloud-init. - operationId: reinstallInstance + description: Update attributes to your role. Attributes are optional. If not + set, the attributes will retain their original values. + operationId: updateRole parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1119,11 +1228,11 @@ paths: schema: type: string style: simple - - description: The identifier of the instance + - description: The identifier of the role example: 12345 explode: false in: path - name: instanceId + name: roleId required: true schema: format: int64 @@ -1133,35 +1242,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ReinstallInstanceRequest' + $ref: '#/components/schemas/UpdateRoleRequest' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ReinstallInstanceResponse' - description: The response will be a JSON object and contains instanceId - and createdDate. + $ref: '#/components/schemas/UpdateRoleResponse' + description: The response will be a JSON object and contains standard role + attributes. security: - bearer: [] - summary: Reinstall specific instance + summary: Update specific role by id tags: - - Instances + - Roles x-codeSamples: - lang: cURL - source: 'curl -X PUT ''https://api.contabo.com/v1/compute/instances/12345'' - -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: - 123213" -d ''{"imageId": "a2c26e8f-84a5-4f3e-9c0e-b06511928cc0", "sshKeys": - [1,2], "rootPassword": 12}''' + source: 'curl -X PATCH ''https://api.contabo.com/v1/roles/12345'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{"name":"infrastructure","permissions":[ + {"apiName": "/v1/compute/instances", "actions": ["READ"] }], "accessAllResources": + true }''' - lang: cntb CLI - source: cntb reinstall instance 12345 --imageId "a2c26e8f-84a5-4f3e-9c0e-b06511928cc0" - --sshKeys "1,2" --rootPassword 12 - /v1/compute/instances/{instanceId}/cancel: - post: - description: Your are free to cancel a previously created instance at any time. - operationId: cancelInstance + source: 'cntb update role 12345 --name newName --permissions ''[{"apiName" + : "/v1/compute/instances", "actions": ["CREATE", "READ"]}]'' --accessAllResources' + /v1/roles/api-permissions: + get: + description: List all available API permissions. This list serves as a reference + for specifying roles. As endpoints differ in their possibilities not all actions + are available for each endpoint. + operationId: retrieveApiPermissionsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1183,105 +1294,72 @@ paths: schema: type: string style: simple - - description: The identifier of the instance - example: 12345 - explode: false - in: path - name: instanceId - required: true + - description: Number of page to be fetched. + example: 1 + explode: true + in: query + name: page + required: false schema: format: int64 type: integer - style: simple - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/CancelInstanceResponse' - description: The response will be a JSON object and contains standard custom - image attributes - security: - - bearer: [] - summary: Cancel specific instance by id - tags: - - Instances - x-codeSamples: - - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/cancel'' - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' - -H ''x-trace-id: 123213''' - - lang: cntb CLI - source: cntb cancel instance 12345 - /v1/compute/instances/{instanceId}/upgrade: - post: - description: In order to enhance your instance with additional features you - can purchase add-ons. Currently only firewalling and private network addon - is allowed. - operationId: upgradeInstance - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id + style: form + - description: Number of elements per page. + example: 10 + explode: true + in: query + name: size required: false - schema: - type: string - style: simple - - description: The identifier of the instance - example: 12345 - explode: false - in: path - name: instanceId - required: true schema: format: int64 type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpgradeInstanceRequest' - required: true + style: form + - description: Specify fields and ordering (ASC for ascending, DESC for descending) + in following format `field:ASC|DESC`. + example: name:asc + explode: true + in: query + name: orderBy + required: false + schema: + items: + type: string + type: array + style: form + - description: The name of api + example: /v1/compute/instances + explode: true + in: query + name: apiName + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/PatchInstanceResponse' - description: The response will be a JSON object and contains standard instance - attributes. + $ref: '#/components/schemas/ListApiPermissionResponse' + description: The response will be a JSON object and contains a paginated + list of API permissions. security: - bearer: [] - summary: Upgrading instance capabilities + summary: List of API permissions tags: - - Instances + - Roles x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/upgrade'' - -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: - 123213" -d ''{ "privateNetworking": {} }''' + source: 'curl -X GET ''https://api.contabo.com/v1/api-permissions'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb upgrade instance 12345 --privateNetworking=true - /v1/compute/instances/actions/audits: + source: cntb get permissions + /v1/users/{userId}/object-storages/credentials: get: - description: List and filters the history about your actions your triggered - via the API. - operationId: retrieveInstancesActionsAuditsList + description: Get list of S3 compatible object storage credentials for accessing + it via S3 compatible tools like `aws` cli. + operationId: listObjectStorageCredentials parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1303,6 +1381,15 @@ paths: schema: type: string style: simple + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple - description: Number of page to be fetched. example: 1 explode: true @@ -1335,52 +1422,32 @@ paths: type: string type: array style: form - - description: The identifier of the instancesActions. - example: 12345 - explode: true - in: query - name: instanceId - required: false - schema: - format: int64 - type: integer - style: form - - description: The requestId of the API call which led to the change. - example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 - explode: true - in: query - name: requestId - required: false - schema: - type: string - style: form - - description: changedBy of the user which led to the change. - example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 + - description: The identifier of the S3 object storage + example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 explode: true in: query - name: changedBy + name: objectStorageId required: false schema: type: string style: form - - description: Start of search time range. - example: 2021-06-02 + - description: 'Filter for Object Storage by regions. Available regions: Asia + (Singapore), European Union (Germany), United States (Central)' + example: Asia (Singapore) explode: true in: query - name: startDate + name: regionName required: false schema: - format: date type: string style: form - - description: End of search time range. - example: 2021-06-02 + - description: Filter for Object Storage by his displayName. + example: Object Storage EU 420 explode: true in: query - name: endDate + name: displayName required: false schema: - format: date type: string style: form responses: @@ -1388,25 +1455,176 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListInstancesActionsAuditResponse' - description: The response will be a JSON object and contains a paginated - list of action audits triggered via the API. + $ref: '#/components/schemas/ListCredentialResponse' + description: The response will be an array of JSON objects that contains + S3 credentials. security: - bearer: [] - summary: List history about your actions (audit) triggered via the API + summary: Get list of S3 compatible object storage credentials for user. tags: - - Instance Actions Audits + - Users x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/actions/audits"' + source: 'curl -X GET ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/credentials'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' - lang: cntb CLI - source: cntb history instancesActions - /v1/compute/instances/audits: + source: cntb get user-credentials 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId}: get: - description: List and filters the history about your custom images. - operationId: retrieveInstancesAuditsList + description: Get S3 compatible object storage credentials for accessing it via + S3 compatible tools like `aws` cli. + operationId: getObjectStorageCredentials + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple + - description: The identifier of the S3 object storage + example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 + explode: false + in: path + name: objectStorageId + required: true + schema: + type: string + style: simple + - description: The ID of the object storage credential + example: 12345 + explode: false + in: path + name: credentialId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FindCredentialResponse' + description: The response will be a JSON object and contains S3 credentials. + security: + - bearer: [] + summary: Get S3 compatible object storage credentials. + tags: + - Users + x-codeSamples: + - lang: cURL + source: 'curl -X GET ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/6641ae21-e45d-4e03-8e70-661067152d1d/credentials/12345'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' + - lang: cntb CLI + source: cntb get user-credentials 6cdf5968-f9fe-4192-97c2-f349e813c5e8 6641ae21-e45d-4e03-8e70-661067152d1d + 12345 + patch: + description: Regenerates secret key of specified user for the a specific S3 + compatible object storages. + operationId: regenerateObjectStorageCredentials + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple + - description: The identifier of the S3 object storage + example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 + explode: false + in: path + name: objectStorageId + required: true + schema: + type: string + style: simple + - description: The ID of the object storage credential + example: 12345 + explode: false + in: path + name: credentialId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FindCredentialResponse' + description: The response will be a JSON object and contains object storage + S3 credentials. + security: + - bearer: [] + summary: Regenerates secret key of specified user for the S3 compatible object + storages. + tags: + - Users + x-codeSamples: + - lang: cURL + source: 'curl -X PATCH ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/6641ae21-e45d-4e03-8e70-661067152d1d/credentials/12345'' + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' + -H ''x-trace-id: 123213''' + - lang: cntb CLI + source: cntb regenerate user-credentials 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + 6641ae21-e45d-4e03-8e70-661067152d1d 12345 + /v1/users/audits: + get: + description: List and filter the history about your users. + operationId: retrieveUserAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1460,15 +1678,14 @@ paths: type: string type: array style: form - - description: The identifier of the instances. - example: 12345 + - description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 explode: true in: query - name: instanceId + name: userId required: false schema: - format: int64 - type: integer + type: string style: form - description: The requestId of the API call which led to the change. example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 @@ -1489,7 +1706,7 @@ paths: type: string style: form - description: Start of search time range. - example: 2021-06-02 + example: 2021-01-01 explode: true in: query name: startDate @@ -1499,7 +1716,7 @@ paths: type: string style: form - description: End of search time range. - example: 2021-06-02 + example: 2021-01-01 explode: true in: query name: endDate @@ -1513,26 +1730,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListInstancesAuditResponse' + $ref: '#/components/schemas/ListUserAuditResponse' description: The response will be a JSON object and contains a paginated - list of instances audits triggered via the API. + list of users audits. security: - bearer: [] - summary: List history about your custom images (audit) + summary: List history about your users (audit) tags: - - Instances Audits + - Users Audits x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/audits"' + source: 'curl -X GET ''https://api.contabo.com/v1/users/audits'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31''' - lang: cntb CLI - source: cntb history instances - /v1/compute/images: + source: cntb history users + /v1/roles/audits: get: - description: List and filter all available standard images provided by [Contabo](https://contabo.com) - and your uploaded custom images. - operationId: retrieveImageList + description: List and filter the history about your roles. + operationId: retrieveRoleAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1586,53 +1802,78 @@ paths: type: string type: array style: form - - description: The name of the image - example: Ubuntu + - description: The identifier of the role. + example: "12345" explode: true in: query - name: name + name: roleId + required: false + schema: + format: int64 + type: integer + style: form + - description: The requestId of the API call which led to the change. + example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 + explode: true + in: query + name: requestId required: false schema: type: string style: form - - description: Flag indicating that image is either a standard (true) or a custom - image (false) - example: true + - description: changedBy of the user which led to the change. + example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 explode: true in: query - name: standardImage + name: changedBy required: false schema: - type: boolean + type: string + style: form + - description: Start of search time range. + example: 2021-01-01 + explode: true + in: query + name: startDate + required: false + schema: + format: date + type: string + style: form + - description: End of search time range. + example: 2021-01-01 + explode: true + in: query + name: endDate + required: false + schema: + format: date + type: string style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ListImageResponse' + $ref: '#/components/schemas/ListRoleAuditResponse' description: The response will be a JSON object and contains a paginated - list of images. + list of roles audits. security: - bearer: [] - summary: List available standard and custom images + summary: List history about your roles (audit) tags: - - Images + - Roles Audits x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/compute/images'' -H ''Content-Type: + source: 'curl -X GET ''https://api.contabo.com/v1/roles/audits'' -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' + 04e0f898-37b4-48bc-a794-1a57abe6aa31''' - lang: cntb CLI - source: cntb get images - post: - description: In order to provide a custom image please specify an URL from where - the image can be directly downloaded. A custom image must be in either `.iso` - or `.qcow2` format. Other formats will be rejected. Please note that downloading - can take a while depending on network speed resp. bandwidth and size of image. - You can check the status by retrieving information about the image via a GET - request. Download will be rejected if you have exceeded your limits. - operationId: createCustomImage + source: cntb history roles + /v1/object-storages: + get: + description: List and filter all object storages in your account + operationId: retrieveObjectStorageList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1654,153 +1895,92 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateCustomImageRequest' - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/CreateCustomImageResponse' - description: The response will be a JSON object and contains standard custom - image attributes - "415": - content: - application/json: - schema: - $ref: '#/components/schemas/CreateCustomImageFailResponse' - description: The response will be an error in case the provided image URL - is not in .qcow2 or .iso format - security: - - bearer: [] - summary: Provide a custom image - tags: - - Images - x-codeSamples: - - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/compute/images'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{"name": - "Ubuntu Custom Image", "description": "Ubuntu Server 20.04.2 LTS", "url": - "https://example.com/image.qcow2", "osType": "Linux", "version": "20.04.2"}''' - - lang: cntb CLI - source: cntb create image --name 'Ubuntu Custom Image' --description 'Ubuntu - Server 20.04.2 LTS' --url https://example.com/image.qcow2 --osType Linux - --version 20.04.2 - /v1/compute/images/{imageId}: - delete: - description: Your are free to delete a previously uploaded custom images at - any time - operationId: deleteImage - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true + - description: Number of page to be fetched. + example: 1 + explode: true + in: query + name: page + required: false schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id + format: int64 + type: integer + style: form + - description: Number of elements per page. + example: 10 + explode: true + in: query + name: size required: false schema: - type: string - style: simple - - description: The identifier of the image - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - explode: false - in: path - name: imageId - required: true + format: int64 + type: integer + style: form + - description: Specify fields and ordering (ASC for ascending, DESC for descending) + in following format `field:ASC|DESC`. + example: name:asc + explode: true + in: query + name: orderBy + required: false schema: - type: string - style: simple - responses: - "204": - description: Response body has no content - security: - - bearer: [] - summary: Delete an uploaded custom image by its id - tags: - - Images - x-codeSamples: - - lang: cURL - source: 'curl -X DELETE ''https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' - - lang: cntb CLI - source: cntb delete image 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - get: - description: Get details about a specific image. This could be either a standard - or custom image. In case of an custom image you can also check the download - status - operationId: retrieveImage - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true + items: + type: string + type: array + style: form + - description: Filter for Object Storage locations. + example: European Union (Germany) 2 + explode: true + in: query + name: dataCenterName + required: false schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + minLength: 1 type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id + style: form + - description: Filter for Object Storage S3 tenantId. + example: 2cd2e5e1444a41b0bed16c6410ecaa84 + explode: true + in: query + name: s3TenantId required: false schema: type: string - style: simple - - description: The identifier of the image - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - explode: false - in: path - name: imageId - required: true + style: form + - description: 'Filter for Object Storage by regions. Available regions: EU, + US-central, SIN' + example: EU + explode: true + in: query + name: region + required: false schema: type: string - style: simple + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/FindImageResponse' - description: The response will be a JSON object and contains standard custom - image attributes + $ref: '#/components/schemas/ListObjectStorageResponse' + description: The response will be a JSON object and contains a paginated + list of object storages. security: - bearer: [] - summary: Get details about a specific image by its id + summary: List all your object storages tags: - - Images + - Object Storages x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' + source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages"' - lang: cntb CLI - source: cntb get image 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - patch: - description: Update name of the custom image - operationId: updateImage + source: cntb get objectStorages + post: + description: Create / purchase a new object storage in your account. Please + note that you can only buy one object storage per location. You can actually + increase the object storage space via `POST` to `/v1/object-storages/{objectStorageId}/resize` + operationId: createObjectStorage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1822,49 +2002,40 @@ paths: schema: type: string style: simple - - description: The identifier of the image - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - explode: false - in: path - name: imageId - required: true - schema: - type: string - style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateCustomImageRequest' + $ref: '#/components/schemas/CreateObjectStorageRequest' required: true responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/UpdateCustomImageResponse' - description: The response will be a JSON object and contains standard custom - image attributes + $ref: '#/components/schemas/CreateObjectStorageResponse' + description: The response will be a JSON object and contains standard object + storage attributes. security: - bearer: [] - summary: Update custom image name by its id + summary: Create a new object storage tags: - - Images + - Object Storages x-codeSamples: - lang: cURL - source: 'curl -X PATCH ''https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213'' -d ''{"name": "Ubuntu Custom Image"}''' + source: 'curl -X POST "https://api.contabo.com/v1/object-storages" -H "accept: + application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" -H "Content-Type: + application/json" -d ''{ "displayName": "Object storage EU 1", "region": + "EU", "autoScaling": { "state": "enabled", "sizeLimitTB": 1 }, "totalPurchasedSpaceTB": + 1 }''' - lang: cntb CLI - source: cntb update image 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d --name 'Ubuntu - Custom Image' - /v1/compute/images/stats: + source: cntb create objectStorage --displayName "Object storage EU 1" --region + "EU" --totalPurchasedSpaceTB 1 --scalingState=enabled --scalingLimitTB 1 + /v1/data-centers: get: - description: List statistics regarding the customer's custom images such as - the number of custom images uploaded, used disk space, free available disk - space and total available disk space - operationId: retrieveCustomImagesStats + description: List all data centers and their corresponding regions. + operationId: retrieveDataCenterList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -1886,63 +2057,6 @@ paths: schema: type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/CustomImagesStatsResponse' - description: The response will be a JSON object and contains the custom - images count, the total available disk space, the used disk space and - the free disk space. - security: - - bearer: [] - summary: List statistics regarding the customer's custom images - tags: - - Images - x-codeSamples: - - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/compute/images/stats'' -H - ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' - - lang: cntb CLI - source: cntb get images stats - /v1/compute/instances/{instanceId}/snapshots: - get: - description: List and filter all your snapshots for a specific instance - operationId: retrieveSnapshotList - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: - type: string - style: simple - - description: The identifier of the instance - example: 12345 - explode: false - in: path - name: instanceId - required: true - schema: - format: int64 - type: integer - style: simple - description: Number of page to be fetched. example: 1 explode: true @@ -1975,13 +2089,44 @@ paths: type: string type: array style: form - - description: Filter as substring match for snapshots names. - example: Snapshot.Server + - description: Filter as match for data centers. + example: EU1 + explode: true + in: query + name: slug + required: false + schema: + minLength: 1 + type: string + style: form + - description: Filter for Object Storages regions. + example: European Union (Germany) 1 explode: true in: query name: name required: false schema: + minLength: 1 + type: string + style: form + - description: Filter for Object Storage region names. + example: European Union (Germany) + explode: true + in: query + name: regionName + required: false + schema: + minLength: 1 + type: string + style: form + - description: Filter for Object Storage region slugs. + example: EU + explode: true + in: query + name: regionSlug + required: false + schema: + minLength: 1 type: string style: form responses: @@ -1989,25 +2134,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListSnapshotResponse' + $ref: '#/components/schemas/ListDataCenterResponse' description: The response will be a JSON object and contains a paginated - list of snapshots attributes + list of data centers. security: - bearer: [] - summary: List snapshots + summary: List data centers tags: - - Snapshots + - Object Storages x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances/12345/snapshots'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' + source: 'curl -X GET -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/data-centers"' - lang: cntb CLI - source: cntb get snapshots 12345 - post: - description: Create a new snapshot for instance, with name and description attributes - operationId: createSnapshot + source: cntb get datacenters + /v1/object-storages/{objectStorageId}: + get: + description: Get data for a specific object storage on your account. + operationId: retrieveObjectStorage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2029,48 +2173,39 @@ paths: schema: type: string style: simple - - description: The identifier of the instance - example: 12345 + - description: The identifier of the object storage. + example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 explode: false in: path - name: instanceId + name: objectStorageId required: true schema: - format: int64 - type: integer + type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateSnapshotRequest' - required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/CreateSnapshotResponse' - description: The response will be a JSON object and contains standard snapshot - attributes + $ref: '#/components/schemas/FindObjectStorageResponse' + description: The response will be a JSON object and contains standard object + storage attributes. security: - bearer: [] - summary: Create a new instance snapshot + summary: Get specific object storage by its id tags: - - Snapshots + - Object Storages x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/snapshots'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213'' -d ''{"name":"Snapshot-Server","description":"Snapshot-Description"}''' + source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc"' - lang: cntb CLI - source: cntb create snapshot 12345 --name 'Snapshot-Server' --description - 'Snapshot-Description' - /v1/compute/instances/{instanceId}/snapshots/{snapshotId}: - delete: - description: Delete existing instance snapshot by id - operationId: deleteSnapshot + source: cntb get objectStorage ea639fc6-9aae-4d71-af8b-046dda87a9cc + patch: + description: Modifies the display name of object storage. Display name must + be unique. + operationId: updateObjectStorage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2092,44 +2227,49 @@ paths: schema: type: string style: simple - - description: The identifier of the instance - example: 12345 - explode: false - in: path - name: instanceId - required: true - schema: - format: int64 - type: integer - style: simple - - description: The identifier of the snapshot - example: snap1628603855 + - description: The identifier of the object storage. + example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 explode: false in: path - name: snapshotId + name: objectStorageId required: true schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchObjectStorageRequest' + required: true responses: - "204": - description: Response body has no content + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CancelObjectStorageResponse' + description: The response will be a JSON object and contains the object + storage with updated display name. security: - bearer: [] - summary: Delete existing snapshot by id + summary: Modifies the display name of object storage tags: - - Snapshots + - Object Storages x-codeSamples: - lang: cURL - source: 'curl -X DELETE ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' + source: 'curl -X PATCH "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc" + -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: + 123213" -H "Content-Type: application/json" -d ''{ "displayName": "Object + storage EU 2"}''' - lang: cntb CLI - source: cntb delete snapshot 12345 snap1628603855 - get: - description: Get all attributes for a specific snapshot - operationId: retrieveSnapshot + source: cntb update objectStorage --displayName "Object storage EU 1" + /v1/object-storages/{objectStorageId}/resize: + post: + description: Upgrade object storage size. You can also adjust the autoscaling + settings for your object storage. Autoscaling allows you to automatically + purchase storage capacity on a monthly basis up to the specified limit. + operationId: upgradeObjectStorage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2151,51 +2291,50 @@ paths: schema: type: string style: simple - - description: The identifier of the instance - example: 12345 - explode: false - in: path - name: instanceId - required: true - schema: - format: int64 - type: integer - style: simple - - description: The identifier of the snapshot - example: snap1628603855 + - description: The identifier of the object storage. + example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 explode: false in: path - name: snapshotId + name: objectStorageId required: true schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpgradeObjectStorageRequest' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/FindSnapshotResponse' - description: The response will be a JSON object and contains standard snapshot - attributes + $ref: '#/components/schemas/UpgradeObjectStorageResponse' + description: The response will be a JSON object and contains standard object + storage attributes. security: - bearer: [] - summary: Retrieve a specific snapshot by id + summary: Upgrade object storage size resp. update autoscaling settings. tags: - - Snapshots + - Object Storages x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' + source: 'curl -X POST -H "accept: application/json" -H "Content-Type: application/json" + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" + -H "x-trace-id: 123213" -d ''{ "autoScaling": { "state": "enabled", "sizeLimitTB": + 6 }, "totalPurchasedSpaceTB": 8 }'' "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/resize"' - lang: cntb CLI - source: cntb get snapshot 12345 snap1628603855 - patch: - description: Update attributes of a snapshot. You may only specify the attributes - you want to change. If an attribute is not set, it will retain its original - value. - operationId: updateSnapshot + source: cntb resize objectStorage ea639fc6-9aae-4d71-af8b-046dda87a9cc --totalPurchasedSpaceTB + 8 --scalingLimitTB 6 --scalingState="enabled" + /v1/object-storages/{objectStorageId}/stats: + get: + description: List usage statistics about the specified object storage such as + the number of objects uploaded / created, used object storage space. Please + note that the usage statistics are updated regularly and are not live usage + statistics. + operationId: retrieveObjectStoragesStats parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2217,58 +2356,41 @@ paths: schema: type: string style: simple - - description: The identifier of the instance - example: 12345 - explode: false - in: path - name: instanceId - required: true - schema: - format: int64 - type: integer - style: simple - - description: The identifier of the snapshot - example: snap1628603855 + - description: The identifier of the object storage. + example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 explode: false in: path - name: snapshotId + name: objectStorageId required: true schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateSnapshotRequest' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/UpdateSnapshotResponse' - description: The response will be a JSON object and contains standard snapshot - attributes + $ref: '#/components/schemas/ObjectStoragesStatsResponse' + description: The response will be a JSON object and contains the object + storages count the current object storages and give the current quota + maximum. security: - bearer: [] - summary: Update specific snapshot by id + summary: List usage statistics about the specified object storage tags: - - Snapshots + - Object Storages x-codeSamples: - lang: cURL - source: 'curl -X PATCH ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213'' -d ''{"name":"Snapshot"}''' + source: 'curl -X GET ''https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/stats'' + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' + -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb update snapshot 12345 snap1628603855 --name 'Snapshot' - /v1/compute/instances/{instanceId}/snapshots/{snapshotId}/rollback: - post: - description: Rollback instance to a specific snapshot. The snapshot must be - the latest one in order to be able to restore it, otherwise you will receive - an error informing you that the snapshot is not the latest - operationId: rollbackSnapshot + source: cntb stats objectStorage 1f771979-1c0f-44ab-ab5b-2c3752731b45 + /v1/object-storages/{objectStorageId}/cancel: + patch: + description: Cancels the specified object storage at the next possible date. + Please be aware of your contract periods. + operationId: CancelObjectStorage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2290,22 +2412,56 @@ paths: schema: type: string style: simple - - description: The identifier of the instance - example: 12345 + - description: The identifier of the object storage. + example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 explode: false in: path - name: instanceId + name: objectStorageId required: true schema: - format: int64 - type: integer + type: string style: simple - - description: The identifier of the snapshot - example: snap1628603855 + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CancelObjectStorageResponse' + description: The response will be a JSON object and contains the objectstorageId + and cancel date. + security: + - bearer: [] + summary: Cancels the specified object storage at the next possible date + tags: + - Object Storages + x-codeSamples: + - lang: cURL + source: 'curl -X PATCH -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/cancel"' + - lang: cntb CLI + source: cntb cancel objectStorage 1f771979-1c0f-44ab-ab5b-2c3752731b45 + /v1/create-ticket: + post: + description: Create a new support ticket. + operationId: createTicket + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' explode: false - in: path - name: snapshotId + in: header + name: x-request-id required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false schema: type: string style: simple @@ -2313,32 +2469,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RollbackSnapshotRequest' + $ref: '#/components/schemas/CreateTicketRequest' required: true responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/RollbackSnapshotResponse' - description: The response will be a JSON object and contains standard snapshot - attributes + $ref: '#/components/schemas/CreateTicketResponse' + description: The response will be a JSON object and contains standard support + ticket attributes. security: - bearer: [] - summary: Revert the instance to a particular snapshot based on its identifier + summary: Create a new support ticket tags: - - Snapshots + - Internal x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855/rollback'' - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' - -H ''x-trace-id: 123213''' - - lang: cntb CLI - source: cntb rollback snapshot 12345 snap1628603855 - /v1/compute/images/audits: + source: 'curl -X POST ''https://api.contabo.com/v1/create-ticket'' -H "Content-Type: + application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: 123213'' -d ''{"subject": + "Subject", "note": "Note"}''' + /v1/object-storages/audits: get: - description: List and filters the history about your custom images. - operationId: retrieveImageAuditsList + description: List and filters the history about your object storages. + operationId: retrieveObjectStorageAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2392,11 +2547,11 @@ paths: type: string type: array style: form - - description: The identifier of the image. - example: e443eab5-647a-4bc3-b4f9-16f5a281224d + - description: The identifier of the object storage. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 explode: true in: query - name: imageId + name: objectStorageId required: false schema: type: string @@ -2410,7 +2565,7 @@ paths: schema: type: string style: form - - description: UserId of the user which led to the change. + - description: changedBy of the user which led to the change. example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 explode: true in: query @@ -2420,7 +2575,7 @@ paths: type: string style: form - description: Start of search time range. - example: 2021-06-02 + example: 2021-01-01 explode: true in: query name: startDate @@ -2430,7 +2585,7 @@ paths: type: string style: form - description: End of search time range. - example: 2021-06-02 + example: 2021-01-01 explode: true in: query name: endDate @@ -2444,26 +2599,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ImageAuditResponse' + $ref: '#/components/schemas/ListObjectStorageAuditResponse' description: The response will be a JSON object and contains a paginated - list of custom images audits. + list of object storage audits. security: - bearer: [] - summary: List history about your custom images (audit) + summary: List history about your object storages (audit) tags: - - Images Audits + - Object Storages Audits x-codeSamples: - lang: cURL source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/images/audits"' + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/audits"' - lang: cntb CLI - source: cntb history images - /v1/compute/snapshots/audits: + source: cntb history objectStorages + /v1/tags: get: - description: List and filters the history about your snapshots your triggered - via the API. - operationId: retrieveSnapshotsAuditsList + description: List and filter all tags in your account + operationId: retrieveTagList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2517,61 +2671,15 @@ paths: type: string type: array style: form - - description: The identifier of the instance - example: 12345 - explode: true - in: query - name: instanceId - required: false - schema: - format: int64 - type: integer - style: form - - description: The identifier of the snapshot - example: snap1628603855 - explode: true - in: query - name: snapshotId - required: false - schema: - type: string - style: form - - description: The requestId of the API call which led to the change - example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 - explode: true - in: query - name: requestId - required: false - schema: - type: string - style: form - - description: changedBy of the user which led to the change - example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 - explode: true - in: query - name: changedBy - required: false - schema: - type: string - style: form - - description: Start of search time range. - example: 2021-06-02 - explode: true - in: query - name: startDate - required: false - schema: - format: date - type: string - style: form - - description: End of search time range. - example: 2021-06-02 + - description: Filter as substring match for tag names. Tags may contain letters, + numbers, colons, dashes, and underscores. There is a limit of 255 characters + per tag. + example: web explode: true in: query - name: endDate + name: name required: false schema: - format: date type: string style: form responses: @@ -2579,25 +2687,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListSnapshotsAuditResponse' + $ref: '#/components/schemas/ListTagResponse' description: The response will be a JSON object and contains a paginated - list of snapshots audits triggered via the API. + list of tags. security: - bearer: [] - summary: List history about your snapshots (audit) triggered via the API + summary: List tags tags: - - Snapshots Audits + - Tags x-codeSamples: - lang: cURL source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/snapshots/audits"' + -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags"' - lang: cntb CLI - source: cntb history snapshots - /v1/object-storages: - get: - description: List and filter all object storages in your account - operationId: retrieveObjectStorageList + source: cntb get tags + post: + description: Create a new tag in your account with attribute name and optional + attribute color. + operationId: createTag parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2619,92 +2727,141 @@ paths: schema: type: string style: simple - - description: Number of page to be fetched. - example: 1 - explode: true - in: query - name: page - required: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTagRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTagResponse' + description: The response will be a JSON object and contains standard tag + attributes. + security: + - bearer: [] + summary: Create a new tag + tags: + - Tags + x-codeSamples: + - lang: cURL + source: 'curl -X POST "https://api.contabo.com/v1/tags" -H "accept: application/json" + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: + 123213" -H "Content-Type: application/json" -d ''{"name":"Web-Server","color":"#0A78C3"}''' + - lang: cntb CLI + source: cntb create tag --name "Web-Server" --color "#0A78C3" + /v1/tags/{tagId}: + delete: + description: Your tag can be deleted if it is not assigned to any resource on + your account. Check tag assigments before deleting tag. + operationId: deleteTag + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true schema: - format: int64 - type: integer - style: form - - description: Number of elements per page. - example: 10 - explode: true - in: query - name: size + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id required: false + schema: + type: string + style: simple + - description: The identifier of the tag + example: 12345 + explode: false + in: path + name: tagId + required: true schema: format: int64 type: integer - style: form - - description: Specify fields and ordering (ASC for ascending, DESC for descending) - in following format `field:ASC|DESC`. - example: name:asc - explode: true - in: query - name: orderBy - required: false - schema: - items: - type: string - type: array - style: form - - description: Filter for Object Storage locations. - example: European Union (Germany) 2 - explode: true - in: query - name: dataCenterName - required: false + style: simple + responses: + "204": + description: Response body has no content + security: + - bearer: [] + summary: Delete existing tag by id + tags: + - Tags + x-codeSamples: + - lang: cURL + source: 'curl -X DELETE -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345"' + - lang: cntb CLI + source: cntb delete tag 12345 + get: + description: Get attributes values to a specific tag on your account. + operationId: retrieveTag + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true schema: - minLength: 1 + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ type: string - style: form - - description: Filter for Object Storage S3 tenantId. - example: 2cd2e5e1444a41b0bed16c6410ecaa84 - explode: true - in: query - name: s3TenantId + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id required: false schema: type: string - style: form - - description: 'Filter for Object Storage by regions. Available regions: EU, - US-central, SIN' - example: EU - explode: true - in: query - name: region - required: false + style: simple + - description: The identifier of the tag + example: 12345 + explode: false + in: path + name: tagId + required: true schema: - type: string - style: form + format: int64 + type: integer + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ListObjectStorageResponse' - description: The response will be a JSON object and contains a paginated - list of object storages. + $ref: '#/components/schemas/FindTagResponse' + description: The response will be a JSON object and contains standard tag + attributes. security: - bearer: [] - summary: List all your object storages + summary: Get specific tag by id tags: - - Object Storages + - Tags x-codeSamples: - lang: cURL source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages"' + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345"' - lang: cntb CLI - source: cntb get objectStorages - post: - description: Create / purchase a new object storage in your account. Please - note that you can only buy one object storage per location. You can actually - increase the object storage space via `POST` to `/v1/object-storages/{objectStorageId}/resize` - operationId: createObjectStorage + source: cntb get tag 12345 + patch: + description: Update attributes to your tag. Attributes are optional. If not + set, the attributes will retain their original values. + operationId: updateTag parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2726,40 +2883,46 @@ paths: schema: type: string style: simple + - description: The identifier of the tag + example: 12345 + explode: false + in: path + name: tagId + required: true + schema: + format: int64 + type: integer + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateObjectStorageRequest' + $ref: '#/components/schemas/UpdateTagRequest' required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/CreateObjectStorageResponse' - description: The response will be a JSON object and contains standard object - storage attributes. + $ref: '#/components/schemas/UpdateTagResponse' + description: The response will be a JSON object and contains standard tag + attributes. security: - bearer: [] - summary: Create a new object storage + summary: Update specific tag by id tags: - - Object Storages + - Tags x-codeSamples: - lang: cURL - source: 'curl -X POST "https://api.contabo.com/v1/object-storages" -H "accept: - application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" -H "Content-Type: - application/json" -d ''{ "displayName": "Object storage EU 1", "region": - "EU", "autoScaling": { "state": "enabled", "sizeLimitTB": 1 }, "totalPurchasedSpaceTB": - 1 }''' + source: 'curl -X PATCH -H "accept: application/json" -H "Content-Type: application/json" + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" -d ''{"name": "Updated-Web-Server"}'' "https://api.contabo.com/v1/tags/12345"' - lang: cntb CLI - source: cntb create objectStorage --displayName "Object storage EU 1" --region - "EU" --totalPurchasedSpaceTB 1 --scalingState=enabled --scalingLimitTB 1 - /v1/data-centers: + source: cntb update tag 12345 --name "Updated-Web-Server" + /v1/tags/{tagId}/assignments: get: - description: List all data centers and their corresponding regions. - operationId: retrieveDataCenterList + description: List and filter all existing assignments for a tag in your account + operationId: retrieveAssignmentList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2781,6 +2944,16 @@ paths: schema: type: string style: simple + - description: The identifier of the tag. + example: "12345" + explode: false + in: path + name: tagId + required: true + schema: + format: int64 + type: integer + style: simple - description: Number of page to be fetched. example: 1 explode: true @@ -2813,44 +2986,14 @@ paths: type: string type: array style: form - - description: Filter as match for data centers. - example: EU1 - explode: true - in: query - name: slug - required: false - schema: - minLength: 1 - type: string - style: form - - description: Filter for Object Storages regions. - example: European Union (Germany) 1 - explode: true - in: query - name: name - required: false - schema: - minLength: 1 - type: string - style: form - - description: Filter for Object Storage region names. - example: European Union (Germany) + - description: Filter as substring match for assignment resource type. Resource + type is one of `instance|image|object-storage`. + example: instance explode: true in: query - name: regionName + name: resourceType required: false schema: - minLength: 1 - type: string - style: form - - description: Filter for Object Storage region slugs. - example: EU - explode: true - in: query - name: regionSlug - required: false - schema: - minLength: 1 type: string style: form responses: @@ -2858,24 +3001,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListDataCenterResponse' + $ref: '#/components/schemas/ListAssignmentResponse' description: The response will be a JSON object and contains a paginated - list of data centers. + list of tag assignments. security: - bearer: [] - summary: List data centers + summary: List tag assignments tags: - - Object Storages + - Tag Assignments x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/data-centers"' + source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments"' - lang: cntb CLI - source: cntb get datacenters - /v1/object-storages/{objectStorageId}: - get: - description: Get data for a specific object storage on your account. - operationId: retrieveObjectStorage + source: cntb get tagAssignments 12345 + /v1/tags/{tagId}/assignments/{resourceType}/{resourceId}: + delete: + description: Tag assignment will be removed from the specified resource. If + this tag is being used for access restrictions the affected users will no + longer be able to access that resource. + operationId: deleteAssignment parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2897,39 +3043,54 @@ paths: schema: type: string style: simple - - description: The identifier of the object storage. - example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 + - description: The identifier of the tag. + example: "12345" explode: false in: path - name: objectStorageId + name: tagId + required: true + schema: + format: int64 + type: integer + style: simple + - description: The identifier of the resource type. Resource type is one of + `instance|image|object-storage`. + example: instance + explode: false + in: path + name: resourceType + required: true + schema: + type: string + style: simple + - description: The identifier of the resource id + example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + explode: false + in: path + name: resourceId required: true schema: type: string style: simple responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FindObjectStorageResponse' - description: The response will be a JSON object and contains standard object - storage attributes. + "204": + description: Response body has no content security: - bearer: [] - summary: Get specific object storage by its id + summary: Delete existing tag assignment tags: - - Object Storages + - Tag Assignments x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc"' + source: 'curl -X DELETE -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc"' - lang: cntb CLI - source: cntb get objectStorage ea639fc6-9aae-4d71-af8b-046dda87a9cc - patch: - description: Modifies the display name of object storage. Display name must - be unique. - operationId: updateObjectStorage + source: cntb delete tagAssignment 12345 instance d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + get: + description: Get attributes for a specific tag assignment in your account. For + this the resource type and resource id is required. + operationId: retrieveAssignment parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -2951,49 +3112,60 @@ paths: schema: type: string style: simple - - description: The identifier of the object storage. - example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 + - description: The identifier of the tag. + example: "12345" explode: false in: path - name: objectStorageId + name: tagId + required: true + schema: + format: int64 + type: integer + style: simple + - description: The identifier of the resource type. Resource type is one of + `instance|image|object-storage`. + example: instance + explode: false + in: path + name: resourceType required: true schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchObjectStorageRequest' + - description: The identifier of the resource id + example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + explode: false + in: path + name: resourceId required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/CancelObjectStorageResponse' - description: The response will be a JSON object and contains the object - storage with updated display name. + $ref: '#/components/schemas/FindAssignmentResponse' + description: The response will be a JSON object and contains standard tag + assignment attributes. security: - bearer: [] - summary: Modifies the display name of object storage + summary: Get specific assignment for the tag tags: - - Object Storages + - Tag Assignments x-codeSamples: - lang: cURL - source: 'curl -X PATCH "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc" - -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: - 123213" -H "Content-Type: application/json" -d ''{ "displayName": "Object - storage EU 2"}''' + source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc"' - lang: cntb CLI - source: cntb update objectStorage --displayName "Object storage EU 1" - /v1/object-storages/{objectStorageId}/resize: + source: cntb get tagAssignment 12345 instance d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc post: - description: Upgrade object storage size. You can also adjust the autoscaling - settings for your object storage. Autoscaling allows you to automatically - purchase storage capacity on a monthly basis up to the specified limit. - operationId: upgradeObjectStorage + description: Create a new tag assignment. This marks the specified resource + with the specified tag for organizing purposes or to restrict access to that + resource. + operationId: createAssignment parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -3015,106 +3187,60 @@ paths: schema: type: string style: simple - - description: The identifier of the object storage. - example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 + - description: The identifier of the tag. + example: "12345" explode: false in: path - name: objectStorageId + name: tagId required: true schema: - type: string + format: int64 + type: integer style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpgradeObjectStorageRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/UpgradeObjectStorageResponse' - description: The response will be a JSON object and contains standard object - storage attributes. - security: - - bearer: [] - summary: Upgrade object storage size resp. update autoscaling settings. - tags: - - Object Storages - x-codeSamples: - - lang: cURL - source: 'curl -X POST -H "accept: application/json" -H "Content-Type: application/json" - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" - -H "x-trace-id: 123213" -d ''{ "autoScaling": { "state": "enabled", "sizeLimitTB": - 6 }, "totalPurchasedSpaceTB": 8 }'' "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/resize"' - - lang: cntb CLI - source: cntb resize objectStorage ea639fc6-9aae-4d71-af8b-046dda87a9cc --totalPurchasedSpaceTB - 8 --scalingLimitTB 6 --scalingState="enabled" - /v1/object-storages/{objectStorageId}/stats: - get: - description: List usage statistics about the specified object storage such as - the number of objects uploaded / created, used object storage space. Please - note that the usage statistics are updated regularly and are not live usage - statistics. - operationId: retrieveObjectStoragesStats - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' + - description: The identifier of the resource type. Resource type is one of + `instance|image|object-storage`. + example: instance explode: false - in: header - name: x-request-id + in: path + name: resourceType required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false schema: type: string style: simple - - description: The identifier of the object storage. - example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 + - description: The identifier of the resource id + example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc explode: false in: path - name: objectStorageId + name: resourceId required: true schema: type: string style: simple responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/ObjectStoragesStatsResponse' - description: The response will be a JSON object and contains the object - storages count the current object storages and give the current quota - maximum. + $ref: '#/components/schemas/CreateAssignmentResponse' + description: The response will be a JSON object and contains standard tag + assignment attributes. security: - bearer: [] - summary: List usage statistics about the specified object storage + summary: Create a new assignment for the tag tags: - - Object Storages + - Tag Assignments x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/stats'' - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' - -H ''x-trace-id: 123213''' + source: 'curl -X POST "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc" + -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: + 123213"' - lang: cntb CLI - source: cntb stats objectStorage 1f771979-1c0f-44ab-ab5b-2c3752731b45 - /v1/object-storages/{objectStorageId}/cancel: - patch: - description: Cancels the specified object storage at the next possible date. - Please be aware of your contract periods. - operationId: CancelObjectStorage + source: cntb create tagAssignment 12345 instance d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + /v1/tags/audits: + get: + description: List and filters the history about your assignments. + operationId: retrieveTagAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -3136,88 +3262,110 @@ paths: schema: type: string style: simple - - description: The identifier of the object storage. - example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 - explode: false - in: path - name: objectStorageId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/CancelObjectStorageResponse' - description: The response will be a JSON object and contains the objectstorageId - and cancel date. - security: - - bearer: [] - summary: Cancels the specified object storage at the next possible date - tags: - - Object Storages - x-codeSamples: - - lang: cURL - source: 'curl -X PATCH -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/cancel"' - - lang: cntb CLI - source: cntb cancel objectStorage 1f771979-1c0f-44ab-ab5b-2c3752731b45 - /v1/create-ticket: - post: - description: Create a new support ticket. - operationId: createTicket - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true + - description: Number of page to be fetched. + example: 1 + explode: true + in: query + name: page + required: false + schema: + format: int64 + type: integer + style: form + - description: Number of elements per page. + example: 10 + explode: true + in: query + name: size + required: false + schema: + format: int64 + type: integer + style: form + - description: Specify fields and ordering (ASC for ascending, DESC for descending) + in following format `field:ASC|DESC`. + example: name:asc + explode: true + in: query + name: orderBy + required: false + schema: + items: + type: string + type: array + style: form + - description: The identifier of the tag. + example: "12345" + explode: true + in: query + name: tagId + required: false + schema: + format: int64 + type: integer + style: form + - description: The requestId of the API call which led to the change. + example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 + explode: true + in: query + name: requestId + required: false schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id + style: form + - description: UserId of the user which led to the change. + example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 + explode: true + in: query + name: changedBy required: false schema: type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateTicketRequest' - required: true + style: form + - description: Start of search time range. + example: 2021-01-01 + explode: true + in: query + name: startDate + required: false + schema: + format: date + type: string + style: form + - description: End of search time range. + example: 2021-01-01 + explode: true + in: query + name: endDate + required: false + schema: + format: date + type: string + style: form responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/CreateTicketResponse' - description: The response will be a JSON object and contains standard support - ticket attributes. + $ref: '#/components/schemas/ListTagAuditsResponse' + description: The response will be a JSON object and contains a paginated + list of tags audits. security: - bearer: [] - summary: Create a new support ticket + summary: List history about your assignments (audit) tags: - - Internal + - Tags Audits x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/create-ticket'' -H "Content-Type: - application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: - 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: 123213'' -d ''{"subject": - "Subject", "note": "Note"}''' - /v1/object-storages/audits: + source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/audits"' + - lang: cntb CLI + source: cntb history tags + /v1/tags/assignments/audits: get: - description: List and filters the history about your object storages. - operationId: retrieveObjectStorageAuditsList + description: List and filters the history about your assignments. + operationId: retrieveAssignmentsAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -3271,11 +3419,21 @@ paths: type: string type: array style: form - - description: The identifier of the object storage. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + - description: The identifier of the tag. + example: "12345" explode: true in: query - name: objectStorageId + name: tagId + required: false + schema: + format: int64 + type: integer + style: form + - description: The identifier of the resource. + example: a1b2c3 + explode: true + in: query + name: resourceId required: false schema: type: string @@ -3289,7 +3447,7 @@ paths: schema: type: string style: form - - description: changedBy of the user which led to the change. + - description: UserId of the user which led to the change. example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 explode: true in: query @@ -3323,21 +3481,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListObjectStorageAuditResponse' + $ref: '#/components/schemas/ListAssignmentAuditsResponse' description: The response will be a JSON object and contains a paginated - list of object storage audits. + list of assignments audits. security: - bearer: [] - summary: List history about your object storages (audit) + summary: List history about your assignments (audit) tags: - - Object Storages Audits + - Tag Assignments Audits x-codeSamples: - lang: cURL source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/audits"' + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + "https://api.contabo.com/v1/tags/assignments/audits"' - lang: cntb CLI - source: cntb history objectStorages + source: cntb history tagAssignment /v1/private-networks: get: description: List and filter all Private Networks in your account @@ -3922,6 +4080,86 @@ paths: -H "x-trace-id: 123213" "https://api.contabo.com/v1/private-networks/audits"' - lang: cntb CLI source: cntb history privateNetworks + /v1/tickets: + post: + description: Create a new support ticket + operationId: createSupportTicket + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TicketCreateRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TicketCreateResponse' + description: The response will be a JSON object and contains ticket attributes + security: + - bearer: [] + summary: Create a new support ticket + tags: + - Tickets + /v1/tickets/metadata: + get: + description: Retrieve ticket metadata + operationId: retrieveTicketMetadata + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListTicketMetadataResponse' + description: The response will be a JSON object and contains ticket metadata + security: + - bearer: [] + summary: Retrieve ticket metadata + tags: + - Tickets /v1/secrets: get: description: List and filter all secrets in your account. @@ -4363,16 +4601,19 @@ paths: -H "x-trace-id: 123213" "https://api.contabo.com/v1/secrets/audits"' - lang: cntb CLI source: cntb history secrets - /v1/tags: - get: - description: List and filter all tags in your account - operationId: retrieveTagList - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header + /v1/compute/instances/{instanceId}/actions/start: + post: + description: Starting a compute instance / resource is like powering on a real + server. If the compute instance / resource is already started nothing will + happen. You may check the current status anytime when getting information + about a compute instance / resource. + operationId: start + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header name: x-request-id required: true schema: @@ -4388,73 +4629,39 @@ paths: schema: type: string style: simple - - description: Number of page to be fetched. - example: 1 - explode: true - in: query - name: page - required: false - schema: - format: int64 - type: integer - style: form - - description: Number of elements per page. - example: 10 - explode: true - in: query - name: size - required: false + - description: The identifier of the compute instance / resource to be started + in rescue mode. + example: 12345 + explode: false + in: path + name: instanceId + required: true schema: format: int64 type: integer - style: form - - description: Specify fields and ordering (ASC for ascending, DESC for descending) - in following format `field:ASC|DESC`. - example: name:asc - explode: true - in: query - name: orderBy - required: false - schema: - items: - type: string - type: array - style: form - - description: Filter as substring match for tag names. Tags may contain letters, - numbers, colons, dashes, and underscores. There is a limit of 255 characters - per tag. - example: web - explode: true - in: query - name: name - required: false - schema: - type: string - style: form + style: simple responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/ListTagResponse' - description: The response will be a JSON object and contains a paginated - list of tags. + $ref: '#/components/schemas/InstanceStartActionResponse' + description: Information of started instance security: - bearer: [] - summary: List tags + summary: Start a compute instance / resource identified by its id tags: - - Tags + - Instance Actions x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags"' + source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/start"' - lang: cntb CLI - source: cntb get tags + source: cntb start instance 1234 + /v1/compute/instances/{instanceId}/actions/restart: post: - description: Create a new tag in your account with attribute name and optional - attribute color. - operationId: createTag + description: List of your custom images history, with the ability to apply filters. + operationId: restart parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -4476,37 +4683,44 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateTagRequest' + - description: The identifier of the compute instance / resource to be started + in rescue mode. + example: 12345 + explode: false + in: path + name: instanceId required: true + schema: + format: int64 + type: integer + style: simple responses: "201": content: application/json: schema: - $ref: '#/components/schemas/CreateTagResponse' - description: The response will be a JSON object and contains standard tag - attributes. + $ref: '#/components/schemas/InstanceRestartActionResponse' + description: Information of restarted instance security: - bearer: [] - summary: Create a new tag + summary: Retrieve a list of your custom images history. tags: - - Tags + - Instance Actions x-codeSamples: - lang: cURL - source: 'curl -X POST "https://api.contabo.com/v1/tags" -H "accept: application/json" - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: - 123213" -H "Content-Type: application/json" -d ''{"name":"Web-Server","color":"#0A78C3"}''' + source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/restart"' - lang: cntb CLI - source: cntb create tag --name "Web-Server" --color "#0A78C3" - /v1/tags/{tagId}: - delete: - description: Your tag can be deleted if it is not assigned to any resource on - your account. Check tag assigments before deleting tag. - operationId: deleteTag + source: cntb restart instance 1234 + /v1/compute/instances/{instanceId}/actions/stop: + post: + description: Stopping a compute instance / resource is like powering off a real + server. So please be aware that data may be lost. Alternatively you may log + in and shut your compute instance / resource gracefully via the operating + system. If the compute instance / resource is already stopped nothing will + happen. You may check the current status anytime when getting information + about a compute instance / resource. + operationId: stop parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -4528,34 +4742,41 @@ paths: schema: type: string style: simple - - description: The identifier of the tag + - description: The identifier of the compute instance / resource to be started + in rescue mode. example: 12345 explode: false in: path - name: tagId + name: instanceId required: true schema: format: int64 type: integer style: simple responses: - "204": - description: Response body has no content + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/InstanceStopActionResponse' + description: Information of stoped instance security: - bearer: [] - summary: Delete existing tag by id + summary: Stop compute instance / resource by its id tags: - - Tags + - Instance Actions x-codeSamples: - lang: cURL - source: 'curl -X DELETE -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345"' + source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/stop"' - lang: cntb CLI - source: cntb delete tag 12345 - get: - description: Get attributes values to a specific tag on your account. - operationId: retrieveTag + source: cntb stop instance 1234 + /v1/compute/instances/{instanceId}/actions/shutdown: + post: + description: Shutdown an compute instance / resource. This is similar to pressing + the power button on a physical machine. This will send an ACPI event for the + guest OS, which should then proceed to a clean shutdown. + operationId: shutdown parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -4577,40 +4798,44 @@ paths: schema: type: string style: simple - - description: The identifier of the tag + - description: The identifier of the compute instance / resource to be started + in rescue mode. example: 12345 explode: false in: path - name: tagId + name: instanceId required: true schema: format: int64 type: integer style: simple responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/FindTagResponse' - description: The response will be a JSON object and contains standard tag - attributes. + $ref: '#/components/schemas/InstanceShutdownActionResponse' + description: Information of a shutdown instance security: - bearer: [] - summary: Get specific tag by id + summary: Shutdown compute instance / resource by its id tags: - - Tags + - Instance Actions x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345"' + source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/shutdown"' - lang: cntb CLI - source: cntb get tag 12345 - patch: - description: Update attributes to your tag. Attributes are optional. If not - set, the attributes will retain their original values. - operationId: updateTag + source: cntb shutdown instance 1234 + /v1/compute/instances/{instanceId}/actions/rescue: + post: + description: You can reboot your instance in rescue mode to resolve system issues. + Rescue system is Linux based and its booted instead of your regular operating + system. The disk containing your operating sytstem, software and your data + is already mounted for you to access and repair/modify files. After a reboot + your compute instance will boot your operating system. Please note that this + is for advanced users. + operationId: rescue parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -4632,11 +4857,12 @@ paths: schema: type: string style: simple - - description: The identifier of the tag + - description: The identifier of the compute instance / resource to be started + in rescue mode. example: 12345 explode: false in: path - name: tagId + name: instanceId required: true schema: format: int64 @@ -4646,63 +4872,143 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateTagRequest' + $ref: '#/components/schemas/InstancesActionsRescueRequest' required: true responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/UpdateTagResponse' - description: The response will be a JSON object and contains standard tag - attributes. + $ref: '#/components/schemas/InstanceRescueActionResponse' + description: Information of rescued instance security: - bearer: [] - summary: Update specific tag by id + summary: Rescue a compute instance / resource identified by its id tags: - - Tags + - Instance Actions x-codeSamples: - lang: cURL - source: 'curl -X PATCH -H "accept: application/json" -H "Content-Type: application/json" - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" -d ''{"name": "Updated-Web-Server"}'' "https://api.contabo.com/v1/tags/12345"' + source: "curl -X POST \"https://api.contabo.com/v1/compute/instances/1234/actions/rescue\"\ + \ -H \"Authorization: Bearer ${ACCESS_TOKEN}\" -H \"x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31\"\ + \ -H \"x-trace-id: 123213\" -d '{\"sshKeys\": [1,2], \"rootPassword\": 12,\ + \ \"userData\": \"#cloud-config\n user: root\n ssh_pwauth: true\n disable_root:\ + \ false\n ssh_authorized_keys:\n - \n chpasswd:\n list:\n - root:\ + \ \n expire: False\n\"}'" - lang: cntb CLI - source: cntb update tag 12345 --name "Updated-Web-Server" - /v1/tags/{tagId}/assignments: - get: - description: List and filter all existing assignments for a tag in your account - operationId: retrieveAssignmentList - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: - type: string - style: simple - - description: The identifier of the tag. - example: "12345" - explode: false - in: path - name: tagId + source: |- + cntb rescue instance 1234 --sshKeys "1,2" --rootPassword 12 --userData '#cloud-config + + + + + + + + + + + + + + + user: root + ssh_pwauth: true + disable_root: false + ssh_authorized_keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL6Bja3wXjkpxkGrNkBqcb/WeRlWO33XWnKHS/Uf9lmH testKey' + /v1/compute/instances/{instanceId}/actions/resetPassword: + post: + description: Reset password for a compute instance / resource referenced by + an id. This will reset the current password to the password that you provided + in the body of this request. + operationId: resetPasswordAction + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + - description: The identifier of the compute instance / resource to be started + in rescue mode. + example: 12345 + explode: false + in: path + name: instanceId required: true schema: format: int64 type: integer style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InstancesResetPasswordActionsRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/InstanceResetPasswordActionResponse' + description: Information of an instance password reset + security: + - bearer: [] + summary: Reset password for a compute instance / resource referenced by an id + tags: + - Instance Actions + x-codeSamples: + - lang: cURL + source: 'curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/resetPassword" + -d ''{"sshKeys": [1,2], "rootPassword": 12, "userData": "''#cloud-config\nuser: + root\nssh_pwauth: true\ndisable_root: false\nssh_authorized_keys:\n - \nchpasswd:\n list:\n - + root: \n expire: False\n''"}''' + - lang: cntb CLI + source: "cntb resetPassword instance 1234 --sshKeys \"1,2\" --rootPassword\ + \ 12 --userData \"#cloud-config\n user: root\n ssh_pwauth: true\n disable_root:\ + \ false\n ssh_authorized_keys:\n - \n chpasswd:\n list:\n - root:\ + \ \n expire: False\n\"" + /v1/compute/instances: + get: + description: List and filter all instances in your account + operationId: retrieveInstancesList + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple - description: Number of page to be fetched. example: 1 explode: true @@ -4735,42 +5041,152 @@ paths: type: string type: array style: form - - description: Filter as substring match for assignment resource type. Resource - type is one of `instance|image|object-storage`. - example: instance + - description: The name of the instance + example: vmd12345 explode: true in: query - name: resourceType + name: name + required: false + schema: + type: string + style: form + - description: The display name of the instance + example: myTestInstance + explode: true + in: query + name: displayName + required: false + schema: + type: string + style: form + - description: The data center of the instance + example: European Union (Germany) 1 + explode: true + in: query + name: dataCenter + required: false + schema: + type: string + style: form + - description: The Region of the instance + example: EU + explode: true + in: query + name: region + required: false + schema: + type: string + style: form + - deprecated: true + description: The identifier of the instance (deprecated) + example: 100 + explode: true + in: query + name: instanceId + required: false + schema: + format: int64 + type: integer + style: form + - description: Comma separated instances identifiers + example: 100, 101, 102 + explode: true + in: query + name: instanceIds + required: false + schema: + type: string + style: form + - description: The status of the instance + example: provisioning,installing + explode: true + in: query + name: status + required: false + schema: + enum: + - provisioning + - uninstalled + - running + - stopped + - error + - installing + - unknown + - manual_provisioning + - product_not_available + - verification_required + - rescue + - pending_payment + - other + type: string + style: form + - description: Identifiers of Addons the instances have + example: 1044,827 + explode: true + in: query + name: addOnIds + required: false + schema: + type: string + style: form + - description: Comma separated instance's category depending on Product Id + example: ssd, hdd, nvme + explode: true + in: query + name: productTypes required: false schema: type: string style: form + - description: Filter instances that have an ip config + example: true + explode: true + in: query + name: ipConfig + required: false + schema: + type: boolean + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ListAssignmentResponse' + $ref: '#/components/schemas/ListInstancesResponse' description: The response will be a JSON object and contains a paginated - list of tag assignments. + list of instances. security: - bearer: [] - summary: List tag assignments + summary: List instances tags: - - Tag Assignments + - Instances x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments"' + source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances'' -H ''Content-Type: + application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: + 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb get tagAssignments 12345 - /v1/tags/{tagId}/assignments/{resourceType}/{resourceId}: - delete: - description: Tag assignment will be removed from the specified resource. If - this tag is being used for access restrictions the affected users will no - longer be able to access that resource. - operationId: deleteAssignment + source: cntb get instances + post: + description: Create a new instance for your account with the provided parameters.
ProductIdProductDisk + Size
V45VPS 1 SSD400 GB SSD
V47VPS + 1 Storage800 GB SSD
V46VPS 1 + NVMe100 GB NVMe
V48VPS 2 SSD400 + GB SSD
V50VPS 2 Storage800 GB + SSD
V49VPS 2 NVMe200 GB NVMe
V51VPS + 3 SSD1200 GB SSD
V53VPS 3 Storage2400 + GB SSD
V52VPS 3 NVMe300 GB NVMe
V54VPS + 4 SSD1600 GB SSD
V56VPS 4 Storage3200 + GB SSD
V55VPS 4 NVMe400 GB NVMe
V57VPS + 5 SSD2000 GB SSD
V59VPS 5 Storage4000 + GB SSD
V58VPS 5 NVMe500 GB NVMe
V60VPS + 6 SSD2400 GB SSD
V62VPS 6 Storage4800 + GB SSD
V61VPS 6 NVMe600 GB NVMe
V8VDS + S180 GB NVMe
V9VDS M240 + GB NVMe
V10VDS L360 GB NVMe
V11VDS + XL480 GB NVMe
V16VDS XXL720 + GB NVMe
+ operationId: createInstance parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -4792,54 +5208,39 @@ paths: schema: type: string style: simple - - description: The identifier of the tag. - example: "12345" - explode: false - in: path - name: tagId + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateInstanceRequest' required: true - schema: - format: int64 - type: integer - style: simple - - description: The identifier of the resource type. Resource type is one of - `instance|image|object-storage`. - example: instance - explode: false - in: path - name: resourceType - required: true - schema: - type: string - style: simple - - description: The identifier of the resource id - example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - explode: false - in: path - name: resourceId - required: true - schema: - type: string - style: simple responses: - "204": - description: Response body has no content + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateInstanceResponse' + description: The response will be a JSON object and contains standard instance + attributes. security: - bearer: [] - summary: Delete existing tag assignment + summary: Create a new instance tags: - - Tag Assignments + - Instances x-codeSamples: - lang: cURL - source: 'curl -X DELETE -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc"' + source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances'' -H + "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: + 123213'' -d ''{"region": "EU", "productId": "V1", "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", + "period": 1}''' - lang: cntb CLI - source: cntb delete tagAssignment 12345 instance d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + source: create instance --period 1 --imageId "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" + --productId "V1" -r "EU" + /v1/compute/instances/{instanceId}: get: - description: Get attributes for a specific tag assignment in your account. For - this the resource type and resource id is required. - operationId: retrieveAssignment + description: Get attributes values to a specific instance on your account. + operationId: retrieveInstance parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -4861,60 +5262,102 @@ paths: schema: type: string style: simple - - description: The identifier of the tag. - example: "12345" + - description: The identifier of the instance + example: 12345 explode: false in: path - name: tagId + name: instanceId required: true schema: format: int64 type: integer style: simple - - description: The identifier of the resource type. Resource type is one of - `instance|image|object-storage`. - example: instance + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FindInstanceResponse' + description: The response will be a JSON object and contains standard instance + attributes. + security: + - bearer: [] + summary: Get specific instance by id + tags: + - Instances + x-codeSamples: + - lang: cURL + source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances/12345'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H ''x-trace-id: + 123213''' + - lang: cntb CLI + source: cntb get instance 12345 + patch: + description: Update specific instance by instanceId. + operationId: patchInstance + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' explode: false - in: path - name: resourceType + in: header + name: x-request-id required: true schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ type: string style: simple - - description: The identifier of the resource id - example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + - description: The identifier of the instance + example: 12345 explode: false in: path - name: resourceId + name: instanceId required: true schema: - type: string + format: int64 + type: integer style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchInstanceRequest' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/FindAssignmentResponse' - description: The response will be a JSON object and contains standard tag - assignment attributes. + $ref: '#/components/schemas/PatchInstanceResponse' + description: The response will be a JSON object and contains instanceId + and createdDate. security: - bearer: [] - summary: Get specific assignment for the tag + summary: Update specific instance tags: - - Tag Assignments + - Instances x-codeSamples: - lang: cURL - source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: - Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc"' + source: 'curl -X PATCH ''https://api.contabo.com/v1/compute/instances/12345'' + -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: + 123213" -d ''{"displayName": "VPS"}''' - lang: cntb CLI - source: cntb get tagAssignment 12345 instance d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - post: - description: Create a new tag assignment. This marks the specified resource - with the specified tag for organizing purposes or to restrict access to that - resource. - operationId: createAssignment + source: cntb update instance 12345 --displayName "VPS" + put: + description: You can reinstall a specific instance with a new image and optionally + add ssh keys, a root password or cloud-init. + operationId: reinstallInstance parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -4936,60 +5379,106 @@ paths: schema: type: string style: simple - - description: The identifier of the tag. - example: "12345" + - description: The identifier of the instance + example: 12345 explode: false in: path - name: tagId + name: instanceId required: true schema: format: int64 type: integer style: simple - - description: The identifier of the resource type. Resource type is one of - `instance|image|object-storage`. - example: instance + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReinstallInstanceRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ReinstallInstanceResponse' + description: The response will be a JSON object and contains instanceId + and createdDate. + security: + - bearer: [] + summary: Reinstall specific instance + tags: + - Instances + x-codeSamples: + - lang: cURL + source: 'curl -X PUT ''https://api.contabo.com/v1/compute/instances/12345'' + -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: + 123213" -d ''{"imageId": "a2c26e8f-84a5-4f3e-9c0e-b06511928cc0", "sshKeys": + [1,2], "rootPassword": 12}''' + - lang: cntb CLI + source: cntb reinstall instance 12345 --imageId "a2c26e8f-84a5-4f3e-9c0e-b06511928cc0" + --sshKeys "1,2" --rootPassword 12 + /v1/compute/instances/{instanceId}/cancel: + post: + description: Your are free to cancel a previously created instance at any time. + operationId: cancelInstance + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' explode: false - in: path - name: resourceType + in: header + name: x-request-id required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false schema: type: string style: simple - - description: The identifier of the resource id - example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + - description: The identifier of the instance + example: 12345 explode: false in: path - name: resourceId + name: instanceId required: true schema: - type: string + format: int64 + type: integer style: simple responses: "201": content: application/json: schema: - $ref: '#/components/schemas/CreateAssignmentResponse' - description: The response will be a JSON object and contains standard tag - assignment attributes. + $ref: '#/components/schemas/CancelInstanceResponse' + description: The response will be a JSON object and contains standard custom + image attributes security: - bearer: [] - summary: Create a new assignment for the tag + summary: Cancel specific instance by id tags: - - Tag Assignments + - Instances x-codeSamples: - lang: cURL - source: 'curl -X POST "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc" - -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: - 123213"' + source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/cancel'' + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' + -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb create tagAssignment 12345 instance d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - /v1/tags/audits: - get: - description: List and filters the history about your assignments. - operationId: retrieveTagAuditsList + source: cntb cancel instance 12345 + /v1/compute/instances/{instanceId}/upgrade: + post: + description: In order to enhance your instance with additional features you + can purchase add-ons. Currently only firewalling and private network addon + is allowed. + operationId: upgradeInstance parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5011,21 +5500,84 @@ paths: schema: type: string style: simple - - description: Number of page to be fetched. - example: 1 - explode: true - in: query - name: page - required: false + - description: The identifier of the instance + example: 12345 + explode: false + in: path + name: instanceId + required: true schema: format: int64 type: integer - style: form - - description: Number of elements per page. - example: 10 - explode: true - in: query - name: size + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpgradeInstanceRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PatchInstanceResponse' + description: The response will be a JSON object and contains standard instance + attributes. + security: + - bearer: [] + summary: Upgrading instance capabilities + tags: + - Instances + x-codeSamples: + - lang: cURL + source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/upgrade'' + -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: + 123213" -d ''{ "privateNetworking": {} }''' + - lang: cntb CLI + source: cntb upgrade instance 12345 --privateNetworking=true + /v1/compute/instances/actions/audits: + get: + description: List and filters the history about your actions your triggered + via the API. + operationId: retrieveInstancesActionsAuditsList + parameters: + - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) + to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) + to generate them manually.' + explode: false + in: header + name: x-request-id + required: true + schema: + example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 + pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ + type: string + style: simple + - description: Identifier to trace group of requests. + explode: false + in: header + name: x-trace-id + required: false + schema: + type: string + style: simple + - description: Number of page to be fetched. + example: 1 + explode: true + in: query + name: page + required: false + schema: + format: int64 + type: integer + style: form + - description: Number of elements per page. + example: 10 + explode: true + in: query + name: size required: false schema: format: int64 @@ -5043,11 +5595,11 @@ paths: type: string type: array style: form - - description: The identifier of the tag. - example: "12345" + - description: The identifier of the instancesActions. + example: 12345 explode: true in: query - name: tagId + name: instanceId required: false schema: format: int64 @@ -5062,7 +5614,7 @@ paths: schema: type: string style: form - - description: UserId of the user which led to the change. + - description: changedBy of the user which led to the change. example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 explode: true in: query @@ -5072,7 +5624,7 @@ paths: type: string style: form - description: Start of search time range. - example: 2021-01-01 + example: 2021-06-02 explode: true in: query name: startDate @@ -5082,7 +5634,7 @@ paths: type: string style: form - description: End of search time range. - example: 2021-01-01 + example: 2021-06-02 explode: true in: query name: endDate @@ -5096,25 +5648,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListTagAuditsResponse' + $ref: '#/components/schemas/ListInstancesActionsAuditResponse' description: The response will be a JSON object and contains a paginated - list of tags audits. + list of action audits triggered via the API. security: - bearer: [] - summary: List history about your assignments (audit) + summary: List history about your actions (audit) triggered via the API tags: - - Tags Audits + - Instance Actions Audits x-codeSamples: - lang: cURL source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/audits"' + -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/actions/audits"' - lang: cntb CLI - source: cntb history tags - /v1/tags/assignments/audits: + source: cntb history instancesActions + /v1/compute/instances/audits: get: - description: List and filters the history about your assignments. - operationId: retrieveAssignmentsAuditsList + description: List and filters the history about your custom images. + operationId: retrieveInstancesAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5168,25 +5720,16 @@ paths: type: string type: array style: form - - description: The identifier of the tag. - example: "12345" + - description: The identifier of the instances. + example: 12345 explode: true in: query - name: tagId + name: instanceId required: false schema: format: int64 type: integer style: form - - description: The identifier of the resource. - example: a1b2c3 - explode: true - in: query - name: resourceId - required: false - schema: - type: string - style: form - description: The requestId of the API call which led to the change. example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 explode: true @@ -5196,7 +5739,7 @@ paths: schema: type: string style: form - - description: UserId of the user which led to the change. + - description: changedBy of the user which led to the change. example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 explode: true in: query @@ -5206,7 +5749,7 @@ paths: type: string style: form - description: Start of search time range. - example: 2021-01-01 + example: 2021-06-02 explode: true in: query name: startDate @@ -5216,7 +5759,7 @@ paths: type: string style: form - description: End of search time range. - example: 2021-01-01 + example: 2021-06-02 explode: true in: query name: endDate @@ -5230,25 +5773,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListAssignmentAuditsResponse' + $ref: '#/components/schemas/ListInstancesAuditResponse' description: The response will be a JSON object and contains a paginated - list of assignments audits. + list of instances audits triggered via the API. security: - bearer: [] - summary: List history about your assignments (audit) + summary: List history about your custom images (audit) tags: - - Tag Assignments Audits + - Instances Audits x-codeSamples: - lang: cURL source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" - "https://api.contabo.com/v1/tags/assignments/audits"' + -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/audits"' - lang: cntb CLI - source: cntb history tagAssignment - /v1/users: + source: cntb history instances + /v1/compute/images: get: - description: List and filter all your users. - operationId: retrieveUserList + description: List and filter all available standard images provided by [Contabo](https://contabo.com) + and your uploaded custom images. + operationId: retrieveImageList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5302,29 +5846,21 @@ paths: type: string type: array style: form - - description: Filter as substring match for user emails. - example: john.doe@example.com + - description: The name of the image + example: Ubuntu explode: true in: query - name: email + name: name required: false schema: type: string style: form - - description: Filter if user is enabled or not. - example: "true" - explode: true - in: query - name: enabled - required: false - schema: - type: boolean - style: form - - description: Filter if user is owner or not. - example: "true" + - description: Flag indicating that image is either a standard (true) or a custom + image (false) + example: true explode: true in: query - name: owner + name: standardImage required: false schema: type: boolean @@ -5334,28 +5870,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListUserResponse' + $ref: '#/components/schemas/ListImageResponse' description: The response will be a JSON object and contains a paginated - list of users. + list of images. security: - bearer: [] - summary: List users + summary: List available standard and custom images tags: - - Users + - Images x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/users'' -H ''Content-Type: + source: 'curl -X GET ''https://api.contabo.com/v1/compute/images'' -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb get users + source: cntb get images post: - description: Create a new user with required attributes name, email, enabled, - totp (=Two-factor authentication 2FA), admin (=access to all endpoints and - resources), accessAllResources and roles. You can't specify any password / - secrets for the user. For security reasons the user will have to specify secrets - on his own. - operationId: createUser + description: In order to provide a custom image please specify an URL from where + the image can be directly downloaded. A custom image must be in either `.iso` + or `.qcow2` format. Other formats will be rejected. Please note that downloading + can take a while depending on network speed resp. bandwidth and size of image. + You can check the status by retrieving information about the image via a GET + request. Download will be rejected if you have exceeded your limits. + operationId: createCustomImage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5381,37 +5918,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateUserRequest' + $ref: '#/components/schemas/CreateCustomImageRequest' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/CreateUserResponse' - description: The response will be a JSON object and contains standard user - attributes. + $ref: '#/components/schemas/CreateCustomImageResponse' + description: The response will be a JSON object and contains standard custom + image attributes + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCustomImageFailResponse' + description: The response will be an error in case the provided image URL + is not in .qcow2 or .iso format security: - bearer: [] - summary: Create a new user + summary: Provide a custom image tags: - - Users + - Images x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/users'' -H ''Content-Type: + source: 'curl -X POST ''https://api.contabo.com/v1/compute/images'' -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{ - "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", - "enabled": true, "totp": false, "locale": "en", "roles": [2]}''' + 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{"name": + "Ubuntu Custom Image", "description": "Ubuntu Server 20.04.2 LTS", "url": + "https://example.com/image.qcow2", "osType": "Linux", "version": "20.04.2"}''' - lang: cntb CLI - source: cntb create user --firstName John --lastName Doe --email john.doe@example.com - --enabled --locale en --roles 2 - /v1/users/{userId}: + source: cntb create image --name 'Ubuntu Custom Image' --description 'Ubuntu + Server 20.04.2 LTS' --url https://example.com/image.qcow2 --osType Linux + --version 20.04.2 + /v1/compute/images/{imageId}: delete: - description: By deleting a user he will not be able to access any endpoints - or resources any longer. In order to temporarily disable a user please update - its `enabled` attribute. - operationId: deleteUser + description: Your are free to delete a previously uploaded custom images at + any time + operationId: deleteImage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5433,11 +5977,11 @@ paths: schema: type: string style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + - description: The identifier of the image + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d explode: false in: path - name: userId + name: imageId required: true schema: type: string @@ -5447,20 +5991,22 @@ paths: description: Response body has no content security: - bearer: [] - summary: Delete existing user by id + summary: Delete an uploaded custom image by its id tags: - - Users + - Images x-codeSamples: - lang: cURL - source: 'curl -X DELETE ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8'' + source: 'curl -X DELETE ''https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'' -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb delete user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + source: cntb delete image 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d get: - description: Get attributes for a specific user. - operationId: retrieveUser + description: Get details about a specific image. This could be either a standard + or custom image. In case of an custom image you can also check the download + status + operationId: retrieveImage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5482,11 +6028,11 @@ paths: schema: type: string style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + - description: The identifier of the image + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d explode: false in: path - name: userId + name: imageId required: true schema: type: string @@ -5496,27 +6042,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FindUserResponse' - description: The response will be a JSON object and contains standard user - attributes. + $ref: '#/components/schemas/FindImageResponse' + description: The response will be a JSON object and contains standard custom + image attributes security: - bearer: [] - summary: Get specific user by id + summary: Get details about a specific image by its id tags: - - Users + - Images x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8'' + source: 'curl -X GET ''https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'' -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb get user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + source: cntb get image 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d patch: - description: Update attributes of a user. You may only specify the attributes - you want to change. If an attribute is not set, it will retain its original - value. - operationId: updateUser + description: Update name of the custom image + operationId: updateImage parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5538,11 +6082,11 @@ paths: schema: type: string style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + - description: The identifier of the image + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d explode: false in: path - name: userId + name: imageId required: true schema: type: string @@ -5551,34 +6095,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateUserRequest' + $ref: '#/components/schemas/UpdateCustomImageRequest' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/UpdateUserResponse' - description: The response will be a JSON object and contains standard user - attributes. + $ref: '#/components/schemas/UpdateCustomImageResponse' + description: The response will be a JSON object and contains standard custom + image attributes security: - bearer: [] - summary: Update specific user by id + summary: Update custom image name by its id tags: - - Users + - Images x-codeSamples: - lang: cURL - source: 'curl -X PATCH ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8'' + source: 'curl -X PATCH ''https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'' -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213'' -d ''{"enabled":true,"roles":[1,2,3]}''' + 123213'' -d ''{"name": "Ubuntu Custom Image"}''' - lang: cntb CLI - source: cntb update user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 --enabled --roles - 1 - /v1/users/{userId}/reset-password: - post: - description: Send reset password email for a specific user - operationId: resetPassword + source: cntb update image 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d --name 'Ubuntu + Custom Image' + /v1/compute/images/stats: + get: + description: List statistics regarding the customer's custom images such as + the number of custom images uploaded, used disk space, free available disk + space and total available disk space + operationId: retrieveCustomImagesStats parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5600,43 +6146,32 @@ paths: schema: type: string style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - explode: false - in: path - name: userId - required: true - schema: - type: string - style: simple - - description: The redirect url used for resetting password - example: https://test.contabo.de - explode: true - in: query - name: redirectUrl - required: false - schema: - type: string - style: form responses: - "204": - description: Response body has no content + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CustomImagesStatsResponse' + description: The response will be a JSON object and contains the custom + images count, the total available disk space, the used disk space and + the free disk space. security: - bearer: [] - summary: Send reset password email + summary: List statistics regarding the customer's custom images tags: - - Users + - Images x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/reset-password'' - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' - -H ''x-trace-id: 123213''' + source: 'curl -X GET ''https://api.contabo.com/v1/compute/images/stats'' -H + ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' - lang: cntb CLI - source: cntb resetPassword user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - /v1/users/{userId}/resend-email-verification: - post: - description: Resend email verification for a specific user - operationId: resendEmailVerification + source: cntb get images stats + /v1/compute/instances/{instanceId}/snapshots: + get: + description: List and filter all your snapshots for a specific instance + operationId: retrieveSnapshotList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5658,86 +6193,81 @@ paths: schema: type: string style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + - description: The identifier of the instance + example: 12345 explode: false in: path - name: userId + name: instanceId required: true schema: - type: string + format: int64 + type: integer style: simple - - description: The redirect url used for email verification - example: https://test.contabo.de + - description: Number of page to be fetched. + example: 1 explode: true in: query - name: redirectUrl + name: page required: false schema: - type: string + format: int64 + type: integer style: form - responses: - "204": - description: Response body has no content - security: - - bearer: [] - summary: Resend email verification - tags: - - Users - x-codeSamples: - - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/resend-email-verification'' - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' - -H ''x-trace-id: 123213''' - - lang: cntb CLI - source: cntb resendEmailVerification user 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - /v1/users/client: - get: - description: Get idm client. - operationId: retrieveUserClient - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true + - description: Number of elements per page. + example: 10 + explode: true + in: query + name: size + required: false schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id + format: int64 + type: integer + style: form + - description: Specify fields and ordering (ASC for ascending, DESC for descending) + in following format `field:ASC|DESC`. + example: name:asc + explode: true + in: query + name: orderBy + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter as substring match for snapshots names. + example: Snapshot.Server + explode: true + in: query + name: name required: false schema: type: string - style: simple + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/FindClientResponse' - description: The response will be a JSON object and contains standard client - attributes. + $ref: '#/components/schemas/ListSnapshotResponse' + description: The response will be a JSON object and contains a paginated + list of snapshots attributes security: - bearer: [] - summary: Get client + summary: List snapshots tags: - - Users + - Snapshots x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/users/client'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - /v1/users/client/secret: - put: - description: Generate and get new client secret. - operationId: generateClientSecret + source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances/12345/snapshots'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' + - lang: cntb CLI + source: cntb get snapshots 12345 + post: + description: Create a new snapshot for instance, with name and description attributes + operationId: createSnapshot parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5759,30 +6289,48 @@ paths: schema: type: string style: simple + - description: The identifier of the instance + example: 12345 + explode: false + in: path + name: instanceId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSnapshotRequest' + required: true responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/GenerateClientSecretResponse' - description: The response will be a JSON object and contains new client - secret. + $ref: '#/components/schemas/CreateSnapshotResponse' + description: The response will be a JSON object and contains standard snapshot + attributes security: - bearer: [] - summary: Generate new client secret + summary: Create a new instance snapshot tags: - - Users + - Snapshots x-codeSamples: - lang: cURL - source: 'curl -X PUT ''https://api.contabo.com/v1/users/client/secret'' -H - "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' - -H ''x-trace-id: 123213''' + source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/snapshots'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213'' -d ''{"name":"Snapshot-Server","description":"Snapshot-Description"}''' - lang: cntb CLI - source: cntb generateSecret user - /v1/users/is-password-set: - get: - description: Get info about idm user if the password is set. - operationId: retrieveUserIsPasswordSet + source: cntb create snapshot 12345 --name 'Snapshot-Server' --description + 'Snapshot-Description' + /v1/compute/instances/{instanceId}/snapshots/{snapshotId}: + delete: + description: Delete existing instance snapshot by id + operationId: deleteSnapshot parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5804,33 +6352,44 @@ paths: schema: type: string style: simple - - description: The user ID for checking if password is set for him - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - explode: true - in: query - name: userId - required: false + - description: The identifier of the instance + example: 12345 + explode: false + in: path + name: instanceId + required: true + schema: + format: int64 + type: integer + style: simple + - description: The identifier of the snapshot + example: snap1628603855 + explode: false + in: path + name: snapshotId + required: true schema: type: string - style: form + style: simple responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FindUserIsPasswordSetResponse' - description: The response will be a JSON object and contains standard user - attributes. + "204": + description: Response body has no content security: - bearer: [] - summary: Get user is password set status + summary: Delete existing snapshot by id tags: - - Internal - /v1/roles: + - Snapshots + x-codeSamples: + - lang: cURL + source: 'curl -X DELETE ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' + - lang: cntb CLI + source: cntb delete snapshot 12345 snap1628603855 get: - description: List and filter all your roles. A role allows you to specify permission - to api endpoints and resources like compute. - operationId: retrieveRoleList + description: Get all attributes for a specific snapshot + operationId: retrieveSnapshot parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5852,100 +6411,51 @@ paths: schema: type: string style: simple - - description: Number of page to be fetched. - example: 1 - explode: true - in: query - name: page - required: false - schema: - format: int64 - type: integer - style: form - - description: Number of elements per page. - example: 10 - explode: true - in: query - name: size - required: false + - description: The identifier of the instance + example: 12345 + explode: false + in: path + name: instanceId + required: true schema: format: int64 type: integer - style: form - - description: Specify fields and ordering (ASC for ascending, DESC for descending) - in following format `field:ASC|DESC`. - example: name:asc - explode: true - in: query - name: orderBy - required: false - schema: - items: - type: string - type: array - style: form - - description: The name of the role - example: Web - explode: true - in: query - name: name - required: false - schema: - type: string - style: form - - description: The name of api - example: /v1/compute/instances - explode: true - in: query - name: apiName - required: false - schema: - type: string - style: form - - description: The name of the tag - example: Web - explode: true - in: query - name: tagName - required: false - schema: - type: string - style: form - - description: The type of the tag. Can be either `default` or `custom` - example: custom - explode: true - in: query - name: type - required: false + style: simple + - description: The identifier of the snapshot + example: snap1628603855 + explode: false + in: path + name: snapshotId + required: true schema: type: string - style: form + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ListRoleResponse' - description: The response will be a JSON object and contains a paginated - list of roles. + $ref: '#/components/schemas/FindSnapshotResponse' + description: The response will be a JSON object and contains standard snapshot + attributes security: - bearer: [] - summary: List roles + summary: Retrieve a specific snapshot by id tags: - - Roles + - Snapshots x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/roles'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' + source: 'curl -X GET ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213''' - lang: cntb CLI - source: cntb get roles - post: - description: Create a new role. In order to get a list availbale api enpoints - (apiName) and their actions please refer to the GET api-permissions endpoint. - For specifying `resources` please enter tag ids. For those to take effect - please assign them to a resource in the tag management api. - operationId: createRole + source: cntb get snapshot 12345 snap1628603855 + patch: + description: Update attributes of a snapshot. You may only specify the attributes + you want to change. If an attribute is not set, it will retain its original + value. + operationId: updateSnapshot parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -5967,41 +6477,58 @@ paths: schema: type: string style: simple + - description: The identifier of the instance + example: 12345 + explode: false + in: path + name: instanceId + required: true + schema: + format: int64 + type: integer + style: simple + - description: The identifier of the snapshot + example: snap1628603855 + explode: false + in: path + name: snapshotId + required: true + schema: + type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateRoleRequest' + $ref: '#/components/schemas/UpdateSnapshotRequest' required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/CreateRoleResponse' - description: The response will be a JSON object and contains standard role - attributes. + $ref: '#/components/schemas/UpdateSnapshotResponse' + description: The response will be a JSON object and contains standard snapshot + attributes security: - bearer: [] - summary: Create a new role + summary: Update specific snapshot by id tags: - - Roles + - Snapshots x-codeSamples: - lang: cURL - source: 'curl -X POST ''https://api.contabo.com/v1/roles'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{"name":"infrastructure","permissions":{ - "apiName": "/v1/compute/instances", "actions": [ "CREATE", "READ" ], "resources": - [1111,2222] } }''' + source: 'curl -X PATCH ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855'' + -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" + -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: + 123213'' -d ''{"name":"Snapshot"}''' - lang: cntb CLI - source: 'cntb create role --name "infrastructure" --permissions ''[{"apiName" - : "/v1/compute/instances", "actions": ["CREATE", "READ"], "resources": [1111, - 2222]}]''' - /v1/roles/{roleId}: - delete: - description: You can't delete a role if it is still assigned to a user. In such - cases please remove the role from the users. - operationId: deleteRole + source: cntb update snapshot 12345 snap1628603855 --name 'Snapshot' + /v1/compute/instances/{instanceId}/snapshots/{snapshotId}/rollback: + post: + description: Rollback instance to a specific snapshot. The snapshot must be + the latest one in order to be able to restore it, otherwise you will receive + an error informing you that the snapshot is not the latest + operationId: rollbackSnapshot parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -6023,155 +6550,55 @@ paths: schema: type: string style: simple - - description: The identifier of the role + - description: The identifier of the instance example: 12345 explode: false in: path - name: roleId + name: instanceId required: true schema: format: int64 type: integer style: simple + - description: The identifier of the snapshot + example: snap1628603855 + explode: false + in: path + name: snapshotId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RollbackSnapshotRequest' + required: true responses: - "204": - description: Response body has no content + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RollbackSnapshotResponse' + description: The response will be a JSON object and contains standard snapshot + attributes security: - bearer: [] - summary: Delete existing role by id + summary: Revert the instance to a particular snapshot based on its identifier tags: - - Roles + - Snapshots x-codeSamples: - lang: cURL - source: 'curl -X DELETE ''https://api.contabo.com/v1/roles/12345'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' + source: 'curl -X POST ''https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855/rollback'' + -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' + -H ''x-trace-id: 123213''' - lang: cntb CLI - source: cntb delete role 12345 + source: cntb rollback snapshot 12345 snap1628603855 + /v1/compute/images/audits: get: - description: Get attributes of specific role. - operationId: retrieveRole - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: - type: string - style: simple - - description: The identifier of the role - example: 12345 - explode: false - in: path - name: roleId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FindRoleResponse' - description: The response will be a JSON object and contains standard role - attributes. - security: - - bearer: [] - summary: Get specific role by id - tags: - - Roles - x-codeSamples: - - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/roles/12345'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' - - lang: cntb CLI - source: cntb get role 12345 - put: - description: Update attributes to your role. Attributes are optional. If not - set, the attributes will retain their original values. - operationId: updateRole - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: - type: string - style: simple - - description: The identifier of the role - example: 12345 - explode: false - in: path - name: roleId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateRoleRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateRoleResponse' - description: The response will be a JSON object and contains standard role - attributes. - security: - - bearer: [] - summary: Update specific role by id - tags: - - Roles - x-codeSamples: - - lang: cURL - source: 'curl -X PATCH ''https://api.contabo.com/v1/roles/12345'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213'' -d ''{"name":"infrastructure","permissions":[ - {"apiName": "/v1/compute/instances", "actions": ["READ"] }], "accessAllResources": - true }''' - - lang: cntb CLI - source: 'cntb update role 12345 --name newName --permissions ''[{"apiName" - : "/v1/compute/instances", "actions": ["CREATE", "READ"]}]'' --accessAllResources' - /v1/roles/api-permissions: - get: - description: List all available API permissions. This list serves as a reference - for specifying roles. As endpoints differ in their possibilities not all actions - are available for each endpoint. - operationId: retrieveApiPermissionsList + description: List and filters the history about your custom images. + operationId: retrieveImageAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -6225,13 +6652,51 @@ paths: type: string type: array style: form - - description: The name of api - example: /v1/compute/instances + - description: The identifier of the image. + example: e443eab5-647a-4bc3-b4f9-16f5a281224d explode: true in: query - name: apiName + name: imageId + required: false + schema: + type: string + style: form + - description: The requestId of the API call which led to the change. + example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 + explode: true + in: query + name: requestId + required: false + schema: + type: string + style: form + - description: UserId of the user which led to the change. + example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 + explode: true + in: query + name: changedBy + required: false + schema: + type: string + style: form + - description: Start of search time range. + example: 2021-06-02 + explode: true + in: query + name: startDate + required: false + schema: + format: date + type: string + style: form + - description: End of search time range. + example: 2021-06-02 + explode: true + in: query + name: endDate required: false schema: + format: date type: string style: form responses: @@ -6239,26 +6704,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListApiPermissionResponse' + $ref: '#/components/schemas/ImageAuditResponse' description: The response will be a JSON object and contains a paginated - list of API permissions. + list of custom images audits. security: - bearer: [] - summary: List of API permissions + summary: List history about your custom images (audit) tags: - - Roles + - Images Audits x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/api-permissions'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: 123213''' + source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/images/audits"' - lang: cntb CLI - source: cntb get permissions - /v1/users/{userId}/object-storages/credentials: + source: cntb history images + /v1/compute/snapshots/audits: get: - description: Get list of S3 compatible object storage credentials for accessing - it via S3 compatible tools like `aws` cli. - operationId: listObjectStorageCredentials + description: List and filters the history about your snapshots your triggered + via the API. + operationId: retrieveSnapshotsAuditsList parameters: - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) @@ -6280,15 +6745,6 @@ paths: schema: type: string style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - explode: false - in: path - name: userId - required: true - schema: - type: string - style: simple - description: Number of page to be fetched. example: 1 explode: true @@ -6321,32 +6777,61 @@ paths: type: string type: array style: form - - description: The identifier of the S3 object storage - example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 + - description: The identifier of the instance + example: 12345 explode: true in: query - name: objectStorageId + name: instanceId + required: false + schema: + format: int64 + type: integer + style: form + - description: The identifier of the snapshot + example: snap1628603855 + explode: true + in: query + name: snapshotId required: false schema: type: string style: form - - description: 'Filter for Object Storage by regions. Available regions: Asia - (Singapore), European Union (Germany), United States (Central)' - example: Asia (Singapore) + - description: The requestId of the API call which led to the change + example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 explode: true in: query - name: regionName + name: requestId required: false schema: type: string style: form - - description: Filter for Object Storage by his displayName. - example: Object Storage EU 420 + - description: changedBy of the user which led to the change + example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 explode: true in: query - name: displayName + name: changedBy + required: false + schema: + type: string + style: form + - description: Start of search time range. + example: 2021-06-02 + explode: true + in: query + name: startDate + required: false + schema: + format: date + type: string + style: form + - description: End of search time range. + example: 2021-06-02 + explode: true + in: query + name: endDate required: false schema: + format: date type: string style: form responses: @@ -6354,794 +6839,247 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListCredentialResponse' - description: The response will be an array of JSON objects that contains - S3 credentials. + $ref: '#/components/schemas/ListSnapshotsAuditResponse' + description: The response will be a JSON object and contains a paginated + list of snapshots audits triggered via the API. security: - bearer: [] - summary: Get list of S3 compatible object storage credentials for user. + summary: List history about your snapshots (audit) triggered via the API tags: - - Users + - Snapshots Audits x-codeSamples: - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/credentials'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' + source: 'curl -X GET -H "Content-Type: application/json" -H "Authorization: + Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" + -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/snapshots/audits"' - lang: cntb CLI - source: cntb get user-credentials 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId}: - get: - description: Get S3 compatible object storage credentials for accessing it via - S3 compatible tools like `aws` cli. - operationId: getObjectStorageCredentials - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: - type: string - style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - explode: false - in: path - name: userId - required: true - schema: + source: cntb history snapshots +components: + schemas: + PaginationMeta: + properties: + size: + description: Number of elements per page. + example: 10 + type: number + totalElements: + description: Number of overall matched elements. + example: 100 + type: number + totalPages: + description: Overall number of pages. + example: 10 + type: number + page: + description: Current number of page. + example: 1 + type: number + required: + - page + - size + - totalElements + - totalPages + type: object + ResourcePermissionsResponse: + example: + tagId: 12345 + tagName: Web + properties: + tagId: + description: Tag's id + example: 12345 + format: int64 + type: integer + tagName: + description: Tag name. The resriction is based on the resources which have + been assigned to that tag. If no resource has been assigned to the given + tag, no access will be possible. + example: Web type: string - style: simple - - description: The identifier of the S3 object storage - example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 - explode: false - in: path - name: objectStorageId - required: true - schema: + required: + - tagId + - tagName + type: object + PermissionResponse: + example: + apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + properties: + apiName: + description: API endpoint. In order to get a list availbale api enpoints + please refer to the GET api-permissions endpoint. + example: /v1/compute/instances type: string - style: simple - - description: The ID of the object storage credential - example: 12345 - explode: false - in: path - name: credentialId - required: true - schema: + actions: + description: Action allowed for the API endpoint. Basically `CREATE` corresponds + to POST endpoints, `READ` to GET endpoints, `UPDATE` to PATCH / PUT endpoints + and `DELETE` to DELETE endpoints. + example: + - CREATE + - READ + items: + enum: + - CREATE + - READ + - UPDATE + - DELETE + type: string + type: array + resources: + items: + $ref: '#/components/schemas/ResourcePermissionsResponse' + type: array + required: + - actions + - apiName + type: object + RoleResponse: + example: + roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + properties: + roleId: + description: Role's id + example: 12345 format: int64 type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FindCredentialResponse' - description: The response will be a JSON object and contains S3 credentials. - security: - - bearer: [] - summary: Get S3 compatible object storage credentials. - tags: - - Users - x-codeSamples: - - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/6641ae21-e45d-4e03-8e70-661067152d1d/credentials/12345'' - -H ''Content-Type: application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" - -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' -H ''x-trace-id: - 123213''' - - lang: cntb CLI - source: cntb get user-credentials 6cdf5968-f9fe-4192-97c2-f349e813c5e8 6641ae21-e45d-4e03-8e70-661067152d1d - 12345 - patch: - description: Regenerates secret key of specified user for the a specific S3 - compatible object storages. - operationId: regenerateObjectStorageCredentials - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 type: string - style: simple - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - explode: false - in: path - name: userId - required: true - schema: + customerId: + description: Your customer number + example: "54321" + minLength: 1 type: string - style: simple - - description: The identifier of the S3 object storage - example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 - explode: false - in: path - name: objectStorageId - required: true - schema: + name: + description: Role's name + example: infrastructure type: string - style: simple - - description: The ID of the object storage credential - example: 12345 - explode: false - in: path - name: credentialId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FindCredentialResponse' - description: The response will be a JSON object and contains object storage - S3 credentials. - security: - - bearer: [] - summary: Regenerates secret key of specified user for the S3 compatible object - storages. - tags: - - Users - x-codeSamples: - - lang: cURL - source: 'curl -X PATCH ''https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/6641ae21-e45d-4e03-8e70-661067152d1d/credentials/12345'' - -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'' - -H ''x-trace-id: 123213''' - - lang: cntb CLI - source: cntb regenerate user-credentials 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - 6641ae21-e45d-4e03-8e70-661067152d1d 12345 - /v1/users/audits: - get: - description: List and filter the history about your users. - operationId: retrieveUserAuditsList - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: - type: string - style: simple - - description: Number of page to be fetched. - example: 1 - explode: true - in: query - name: page - required: false - schema: - format: int64 - type: integer - style: form - - description: Number of elements per page. - example: 10 - explode: true - in: query - name: size - required: false - schema: - format: int64 - type: integer - style: form - - description: Specify fields and ordering (ASC for ascending, DESC for descending) - in following format `field:ASC|DESC`. - example: name:asc - explode: true - in: query - name: orderBy - required: false - schema: - items: - type: string - type: array - style: form - - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - explode: true - in: query - name: userId - required: false - schema: - type: string - style: form - - description: The requestId of the API call which led to the change. - example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 - explode: true - in: query - name: requestId - required: false - schema: - type: string - style: form - - description: changedBy of the user which led to the change. - example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 - explode: true - in: query - name: changedBy - required: false - schema: - type: string - style: form - - description: Start of search time range. - example: 2021-01-01 - explode: true - in: query - name: startDate - required: false - schema: - format: date - type: string - style: form - - description: End of search time range. - example: 2021-01-01 - explode: true - in: query - name: endDate - required: false - schema: - format: date - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ListUserAuditResponse' - description: The response will be a JSON object and contains a paginated - list of users audits. - security: - - bearer: [] - summary: List history about your users (audit) - tags: - - Users Audits - x-codeSamples: - - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/users/audits'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31''' - - lang: cntb CLI - source: cntb history users - /v1/roles/audits: - get: - description: List and filter the history about your roles. - operationId: retrieveRoleAuditsList - parameters: - - description: '[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) - to generate them manually.' - explode: false - in: header - name: x-request-id - required: true - schema: - example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 - pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-f]{3}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ - type: string - style: simple - - description: Identifier to trace group of requests. - explode: false - in: header - name: x-trace-id - required: false - schema: - type: string - style: simple - - description: Number of page to be fetched. - example: 1 - explode: true - in: query - name: page - required: false - schema: - format: int64 - type: integer - style: form - - description: Number of elements per page. - example: 10 - explode: true - in: query - name: size - required: false - schema: - format: int64 - type: integer - style: form - - description: Specify fields and ordering (ASC for ascending, DESC for descending) - in following format `field:ASC|DESC`. - example: name:asc - explode: true - in: query - name: orderBy - required: false - schema: - items: - type: string - type: array - style: form - - description: The identifier of the role. - example: "12345" - explode: true - in: query - name: roleId - required: false - schema: - format: int64 - type: integer - style: form - - description: The requestId of the API call which led to the change. - example: D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 - explode: true - in: query - name: requestId - required: false - schema: - type: string - style: form - - description: changedBy of the user which led to the change. - example: 23cbb6d6-cb11-4330-bdff-7bb791df2e23 - explode: true - in: query - name: changedBy - required: false - schema: - type: string - style: form - - description: Start of search time range. - example: 2021-01-01 - explode: true - in: query - name: startDate - required: false - schema: - format: date - type: string - style: form - - description: End of search time range. - example: 2021-01-01 - explode: true - in: query - name: endDate - required: false - schema: - format: date - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ListRoleAuditResponse' - description: The response will be a JSON object and contains a paginated - list of roles audits. - security: - - bearer: [] - summary: List history about your roles (audit) - tags: - - Roles Audits - x-codeSamples: - - lang: cURL - source: 'curl -X GET ''https://api.contabo.com/v1/roles/audits'' -H ''Content-Type: - application/json'' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H ''x-request-id: - 04e0f898-37b4-48bc-a794-1a57abe6aa31''' - - lang: cntb CLI - source: cntb history roles -components: - schemas: - InstanceStartActionResponseData: - example: - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - instanceId: - description: Compute instance / resource id - example: 12345 - format: int64 - type: integer - action: - description: Action that was triggered - example: start - type: string - required: - - action - - customerId - - instanceId - - tenantId - type: object - SelfLinks: - properties: - self: - description: Link to current resource. - type: string - required: - - self - type: object - InstanceStartActionResponse: - example: - data: - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - _links: - self: /v1/compute/instances/12345/actions/start - properties: - data: - items: - $ref: '#/components/schemas/InstanceStartActionResponseData' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/compute/instances/12345/actions/start - required: - - _links - - data - type: object - InstanceRestartActionResponseData: - example: - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - instanceId: - description: Compute instance / resource id - example: 12345 - format: int64 - type: integer - action: - description: Action that was triggered - example: start - type: string - required: - - action - - customerId - - instanceId - - tenantId - type: object - InstanceRestartActionResponse: - example: - data: - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - _links: - self: /v1/compute/instances/12345/actions/restart - properties: - data: - items: - $ref: '#/components/schemas/InstanceRestartActionResponseData' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/compute/instances/12345/actions/restart - required: - - _links - - data - type: object - InstanceStopActionResponseData: - example: - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - instanceId: - description: Compute instance / resource id - example: 12345 - format: int64 - type: integer - action: - description: Action that was triggered - example: start - type: string - required: - - action - - customerId - - instanceId - - tenantId - type: object - InstanceStopActionResponse: - example: - data: - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - _links: - self: /v1/compute/instances/12345/actions/stop - properties: - data: - items: - $ref: '#/components/schemas/InstanceStopActionResponseData' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/compute/instances/12345/actions/stop - required: - - _links - - data - type: object - InstanceShutdownActionResponseData: - example: - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - instanceId: - description: Compute instance / resource id - example: 12345 - format: int64 - type: integer - action: - description: Action that was triggered - example: start + admin: + description: Admin + example: true + type: boolean + accessAllResources: + description: Access All Resources + example: true + type: boolean + type: + description: Role type can be either `default` or `custom`. The `default` + roles cannot be modified or deleted. + example: custom type: string - required: - - action - - customerId - - instanceId - - tenantId - type: object - InstanceShutdownActionResponse: - example: - data: - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - _links: - self: /v1/compute/instances/12345/actions/shutdown - properties: - data: - items: - $ref: '#/components/schemas/InstanceShutdownActionResponseData' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/compute/instances/12345/actions/shutdown - required: - - _links - - data - type: object - InstancesActionsRescueRequest: - example: - userData: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ - ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ - \ \n expire: False\n" - sshKeys: '[123, 125]' - rootPassword: 1 - properties: - rootPassword: - description: '`secretId` of the password to login into rescue system for - the `root` user.' - example: 1 - format: int64 - type: integer - sshKeys: - description: Array of `secretId`s of public SSH keys for logging into rescue - system as `root` user. - example: '[123, 125]' + permissions: items: - format: int64 - type: integer + $ref: '#/components/schemas/PermissionResponse' type: array - userData: - description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize - during start of compute instance.' - example: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ - ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ - \ \n expire: False\n" - type: string - type: object - InstanceRescueActionResponseData: - example: - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - instanceId: - description: Compute instance / resource id - example: 12345 - format: int64 - type: integer - action: - description: Action that was triggered - example: start - type: string required: - - action + - accessAllResources + - admin - customerId - - instanceId + - name + - roleId - tenantId + - type type: object - InstanceRescueActionResponse: + UserResponse: example: - data: - - instanceId: 12345 + owner: false + firstName: John + lastName: Doe + emailVerified: false + totp: false + roles: + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true tenantId: DE customerId: "54321" - action: start - - instanceId: 12345 + name: infrastructure + admin: true + type: custom + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true tenantId: DE customerId: "54321" - action: start - _links: - self: /v1/compute/instances/12345/actions/rescue - properties: - data: - items: - $ref: '#/components/schemas/InstanceRescueActionResponseData' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/compute/instances/12345/actions/rescue - required: - - _links - - data - type: object - InstancesResetPasswordActionsRequest: - example: - userData: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ - ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ - \ \n expire: False\n" - sshKeys: '[123, 125]' - rootPassword: 1 - properties: - sshKeys: - description: Array of `secretId`s of public SSH keys for logging into as - `defaultUser` with administrator/root privileges. Applies to Linux/BSD - systems. Please refer to Secrets Management API. - example: '[123, 125]' - items: - format: int64 - type: integer - type: array - rootPassword: - description: '`secretId` of the password for the `defaultUser` with administrator/root - privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer - to Secrets Management API.' - example: 1 - format: int64 - type: integer - userData: - description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize - during start of compute instance.' - example: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ - ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ - \ \n expire: False\n" - type: string - type: object - InstanceResetPasswordActionResponseData: - example: - instanceId: 12345 + name: infrastructure + admin: true + type: custom tenantId: DE customerId: "54321" - action: start + locale: de + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + email: john.doe@example.com + enabled: false properties: tenantId: description: Your customer tenant id @@ -7153,885 +7091,695 @@ components: example: "54321" minLength: 1 type: string - instanceId: - description: Compute instance / resource id - example: 12345 - format: int64 - type: integer - action: - description: Action that was triggered - example: start + userId: + description: The identifier of the user. + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 type: string - required: - - action - - customerId - - instanceId - - tenantId - type: object - InstanceResetPasswordActionResponse: - example: - data: - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - - instanceId: 12345 - tenantId: DE - customerId: "54321" - action: start - _links: - self: /v1/compute/instances/12345/actions/resetPassword - properties: - data: - items: - $ref: '#/components/schemas/InstanceResetPasswordActionResponseData' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/compute/instances/12345/actions/resetPassword - required: - - _links - - data - type: object - PaginationMeta: - properties: - size: - description: Number of elements per page. - example: 10 - type: number - totalElements: - description: Number of overall matched elements. - example: 100 - type: number - totalPages: - description: Overall number of pages. - example: 10 - type: number - page: - description: Current number of page. - example: 1 - type: number - required: - - page - - size - - totalElements - - totalPages - type: object - IpV4: - example: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - properties: - ip: - description: IP Address - example: 192.168.0.1 + firstName: + description: The first name of the user. Users may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + user. + example: John + maxLength: 255 + minLength: 1 type: string - netmaskCidr: - description: Netmask CIDR - example: 19 - format: int32 - type: integer - gateway: - description: Gateway - example: 1.1.1.1 + lastName: + description: The last name of the user. Users may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + user. + example: Doe + maxLength: 255 + minLength: 1 type: string + email: + description: The email of the user to which activation and forgot password + links are being sent to. There is a limit of 255 characters per email. + example: john.doe@example.com + maxLength: 255 + minLength: 1 + type: string + emailVerified: + description: User email verification status. + example: false + type: boolean + enabled: + description: If uses is not enabled, he can't login and thus use services + any longer. + example: false + type: boolean + totp: + description: Enable or disable two-factor authentication (2FA) via time + based OTP. + example: false + type: boolean + locale: + description: The locale of the user. This can be `de-DE`, `de`, `en-US`, + `en` + enum: + - de-DE + - de + - en-US + - en + example: de + type: string + roles: + description: The roles as list of `roleId`s of the user. + items: + $ref: '#/components/schemas/RoleResponse' + type: array + owner: + description: If user is owner he will have permissions to all API endpoints + and resources. Enabling this will superseed all role definitions and `accessAllResources`. + example: false + type: boolean required: - - gateway - - ip - - netmaskCidr - type: object - AdditionalIp: - example: - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - properties: - v4: - $ref: '#/components/schemas/IpV4' - required: - - v4 + - customerId + - email + - emailVerified + - enabled + - firstName + - lastName + - locale + - owner + - roles + - tenantId + - totp + - userId type: object - IpV6: - example: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 + Links: properties: - ip: - description: IP Address - example: 1:2:3:4:5:6:7:8 + self: + description: Link to current resource. type: string - netmaskCidr: - description: Netmask CIDR - example: 64 - format: int32 - type: integer - gateway: - description: Gateway - example: 1:2:3:4:5:6:7:8 + first: + description: Link to first page, if applicable. + type: string + previous: + description: Link to previous page, if applicable. + type: string + next: + description: Link to next page, if applicable. + type: string + last: + description: Link to last page, if applicable. type: string required: - - gateway - - ip - - netmaskCidr - type: object - IpConfig: - example: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - properties: - v4: - $ref: '#/components/schemas/IpV4' - v6: - $ref: '#/components/schemas/IpV6' - required: - - v4 - - v6 + - first + - last + - self type: object - instanceStatus: - enum: - - provisioning - - uninstalled - - running - - stopped - - error - - installing - - unknown - - manual_provisioning - - product_not_available - - verification_required - - rescue - - pending_payment - - other - type: string - AddOnResponse: + ListUserResponse: example: - quantity: 4 - id: 1431 + data: + - owner: false + firstName: John + lastName: Doe + emailVerified: false + totp: false + roles: + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + tenantId: DE + customerId: "54321" + locale: de + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + email: john.doe@example.com + enabled: false + - owner: false + firstName: John + lastName: Doe + emailVerified: false + totp: false + roles: + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + tenantId: DE + customerId: "54321" + locale: de + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + email: john.doe@example.com + enabled: false + _links: + first: /v1/users?page=1 + next: /v1/users?page=19 + self: /v1/users/12345 + previous: /v1/users?page=21 + last: /v1/users?page=101 + _pagination: "" properties: - id: - description: Id of the Addon. Please refer to list [here](https://contabo.com/en/product-list/?show_ids=true). - example: 1431 - format: int64 - type: integer - quantity: - description: The number of Addons you wish to aquire. - example: 4 - format: int64 - type: integer + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. + data: + items: + $ref: '#/components/schemas/UserResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/Links' + example: + first: /v1/users?page=1 + next: /v1/users?page=19 + self: /v1/users/12345 + previous: /v1/users?page=21 + last: /v1/users?page=101 required: - - id - - quantity + - _links + - _pagination + - data type: object - ListInstancesResponseData: + CreateUserRequest: example: - cancelDate: 2021-06-03T00:00:00.000+0000 - displayName: VPS - regionName: European Union (Germany) - instanceId: 100 - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - osType: Linux - defaultUser: root - sshKeys: - - 123 - - 125 - productType: ssd - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - dataCenter: European Union (Germany) 1 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - ramMb: 1024 - errorMessage: errorMessage - additionalIps: - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - diskMb: 2048 - macAddress: F2:65:50:F3:63:A1 - createdDate: 2021-06-03T06:27:12Z - cpuCores: 4 - vHostId: 73395 - tenantId: DE - name: vmd12345 - region: EU + firstName: John + lastName: Doe + totp: false + roles: + - 1 + - 2 + - 3 + - 4 + locale: de + email: john.doe@example.com + enabled: false properties: - tenantId: - description: Your customer tenant id - enum: - - DE - - INT - example: DE + firstName: + description: The name of the user. Names may contain letters, numbers, colons, + dashes, and underscores. There is a limit of 255 characters per user. + example: John + maxLength: 255 minLength: 1 type: string - customerId: - description: Customer ID - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + lastName: + description: The last name of the user. Users may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + user. + example: Doe + maxLength: 255 minLength: 1 type: string - additionalIps: - items: - $ref: '#/components/schemas/AdditionalIp' - type: array - name: - description: Instance Name - example: vmd12345 - type: string - displayName: - description: Instance display name - example: VPS - type: string - instanceId: - description: Instance ID - example: 100 - format: int64 - type: integer - dataCenter: - description: The data center where your Private Network is located - example: European Union (Germany) 1 - type: string - region: - description: Instance region where the compute instance should be located. - example: EU - type: string - regionName: - description: The name of the region where the instance is located. - example: European Union (Germany) - type: string - productId: - description: Product ID - example: V5 - type: string - imageId: - description: Image's id - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string - ipConfig: - $ref: '#/components/schemas/IpConfig' - macAddress: - description: MAC Address - example: F2:65:50:F3:63:A1 + email: + description: The email of the user to which activation and forgot password + links are being sent to. There is a limit of 255 characters per email. + example: john.doe@example.com + maxLength: 255 + minLength: 1 type: string - ramMb: - description: Image RAM size in MB - example: 1024 - type: number - cpuCores: - description: CPU core count - example: 4 - format: int64 - type: integer - osType: - description: Type of operating system (OS) - example: Linux + enabled: + description: If user is not enabled, he can't login and thus use services + any longer. + example: false + type: boolean + totp: + description: Enable or disable two-factor authentication (2FA) via time + based OTP. + example: false + type: boolean + locale: + description: The locale of the user. This can be `de-DE`, `de`, `en-US`, + `en` + enum: + - de-DE + - de + - en-US + - en + example: de type: string - diskMb: - description: Image Disk size in MB - example: 2048 - type: number - sshKeys: - description: Array of `secretId`s of public SSH keys for logging into as - `defaultUser` with administrator/root privileges. Applies to Linux/BSD - systems. Please refer to Secrets Management API. + roles: + description: The roles as list of `roleId`s of the user. example: - - 123 - - 125 + - 1 + - 2 + - 3 + - 4 items: format: int64 type: integer type: array - createdDate: - description: The creation date for the instance - example: 2021-06-03T06:27:12Z - format: date-time - type: string - cancelDate: - description: The date on which the instance will be cancelled - example: 2021-06-03 - format: date - maxLength: 10 - minLength: 0 - pattern: yyyy-mm-dd - type: string - status: - $ref: '#/components/schemas/instanceStatus' - vHostId: - description: ID of host system - example: 73395 - format: int64 - type: integer - addOns: - items: - $ref: '#/components/schemas/AddOnResponse' - type: array - errorMessage: - description: Message in case of an error. + required: + - email + - enabled + - locale + - totp + type: object + CreateUserResponseData: + example: + tenantId: DE + customerId: "54321" + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 type: string - productType: - description: Instance's category depending on Product Id - enum: - - hdd - - ssd - - vds - - nvme - example: ssd + customerId: + description: Your customer number + example: "54321" + minLength: 1 type: string - defaultUser: - description: Default user name created for login during (re-)installation - with administrative privileges. Allowed values for Linux/BSD are `admin` - (use sudo to apply administrative privileges like root) or `root`. Allowed - values for Windows are `admin` (has administrative privileges like administrator) - or `administrator`. - enum: - - root - - admin - - administrator - example: root + userId: + description: User's id + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 type: string required: - - addOns - - additionalIps - - cancelDate - - cpuCores - - createdDate - customerId - - dataCenter - - diskMb - - displayName - - imageId - - instanceId - - ipConfig - - macAddress - - name - - osType - - productId - - productType - - ramMb - - region - - regionName - - sshKeys - - status - tenantId - - vHostId + - userId type: object - Links: + SelfLinks: properties: self: description: Link to current resource. type: string - first: - description: Link to first page, if applicable. - type: string - previous: - description: Link to previous page, if applicable. - type: string - next: - description: Link to next page, if applicable. - type: string - last: - description: Link to last page, if applicable. - type: string required: - - first - - last - self type: object - ListInstancesResponse: + CreateUserResponse: example: data: - - cancelDate: 2021-06-03T00:00:00.000+0000 - displayName: VPS - regionName: European Union (Germany) - instanceId: 100 - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - osType: Linux - defaultUser: root - sshKeys: - - 123 - - 125 - productType: ssd - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - dataCenter: European Union (Germany) 1 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - ramMb: 1024 - errorMessage: errorMessage - additionalIps: - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - diskMb: 2048 - macAddress: F2:65:50:F3:63:A1 - createdDate: 2021-06-03T06:27:12Z - cpuCores: 4 - vHostId: 73395 + - tenantId: DE + customerId: "54321" + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + - tenantId: DE + customerId: "54321" + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + _links: + self: /v1/users/12345 + properties: + data: + items: + $ref: '#/components/schemas/CreateUserResponseData' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/users/12345 + required: + - _links + - data + type: object + FindUserResponse: + example: + data: + - owner: false + firstName: John + lastName: Doe + emailVerified: false + totp: false + roles: + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom tenantId: DE - name: vmd12345 - region: EU - - cancelDate: 2021-06-03T00:00:00.000+0000 - displayName: VPS - regionName: European Union (Germany) - instanceId: 100 - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - osType: Linux - defaultUser: root - sshKeys: - - 123 - - 125 - productType: ssd - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - dataCenter: European Union (Germany) 1 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - ramMb: 1024 - errorMessage: errorMessage - additionalIps: - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - diskMb: 2048 - macAddress: F2:65:50:F3:63:A1 - createdDate: 2021-06-03T06:27:12Z - cpuCores: 4 - vHostId: 73395 + customerId: "54321" + locale: de + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + email: john.doe@example.com + enabled: false + - owner: false + firstName: John + lastName: Doe + emailVerified: false + totp: false + roles: + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom tenantId: DE - name: vmd12345 - region: EU + customerId: "54321" + locale: de + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + email: john.doe@example.com + enabled: false _links: - first: /v1/compute/instances?page=1 - previous: /v1/compute/instances?page=19 - self: /v1/compute/instances?page=20 - next: /v1/compute/instances?page=21 - last: /v1/compute/instances?page=101 - _pagination: "" + self: /v1/users/12345 properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ListInstancesResponseData' + $ref: '#/components/schemas/UserResponse' type: array _links: allOf: - - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/SelfLinks' example: - first: /v1/compute/instances?page=1 - previous: /v1/compute/instances?page=19 - self: /v1/compute/instances?page=20 - next: /v1/compute/instances?page=21 - last: /v1/compute/instances?page=101 + self: /v1/users/12345 required: - _links - - _pagination - data type: object - InstanceResponse: + UpdateUserRequest: example: - cancelDate: 2021-06-03T00:00:00.000+0000 - displayName: VPS - regionName: European Union (Germany) - instanceId: 100 - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - osType: Linux - defaultUser: root - sshKeys: - - 123 - - 125 - productType: ssd - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - dataCenter: European Union (Germany) 1 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - ramMb: 1024 - errorMessage: errorMessage - additionalIps: - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - diskMb: 2048 - macAddress: F2:65:50:F3:63:A1 - createdDate: 2021-06-03T06:27:12Z - cpuCores: 4 - vHostId: 73395 - tenantId: DE - name: vmd12345 - region: EU + firstName: John + lastName: Doe + totp: false + roles: + - 1 + - 2 + - 3 + - 4 + locale: de + email: john.doe@example.com + enabled: false properties: - tenantId: - description: Your customer tenant id - enum: - - DE - - INT - example: DE + firstName: + description: The name of the user. Names may contain letters, numbers, colons, + dashes, and underscores. There is a limit of 255 characters per user. + example: John + maxLength: 255 minLength: 1 type: string - customerId: - description: Customer ID - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + lastName: + description: The last name of the user. Users may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + user. + example: Doe + maxLength: 255 minLength: 1 type: string - additionalIps: - items: - $ref: '#/components/schemas/AdditionalIp' - type: array - name: - description: Instance Name - example: vmd12345 - type: string - displayName: - description: Instance display name - example: VPS - type: string - instanceId: - description: Instance ID - example: 100 - format: int64 - type: integer - dataCenter: - description: The data center where your Private Network is located - example: European Union (Germany) 1 - type: string - region: - description: Instance region where the compute instance should be located. - example: EU - type: string - regionName: - description: The name of the region where the instance is located. - example: European Union (Germany) - type: string - productId: - description: Product ID - example: V5 - type: string - imageId: - description: Image's id - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string - ipConfig: - $ref: '#/components/schemas/IpConfig' - macAddress: - description: MAC Address - example: F2:65:50:F3:63:A1 + email: + description: The email of the user to which activation and forgot password + links are being sent to. There is a limit of 255 characters per email. + example: john.doe@example.com + maxLength: 255 + minLength: 1 type: string - ramMb: - description: Image RAM size in MB - example: 1024 - type: number - cpuCores: - description: CPU core count - example: 4 - format: int64 - type: integer - osType: - description: Type of operating system (OS) - example: Linux + enabled: + description: If user is not enabled, he can't login and thus use services + any longer. + example: false + type: boolean + totp: + description: Enable or disable two-factor authentication (2FA) via time + based OTP. + example: false + type: boolean + locale: + description: The locale of the user. This can be `de-DE`, `de`, `en-US`, + `en` + enum: + - de-DE + - de + - en-US + - en + example: de type: string - diskMb: - description: Image Disk size in MB - example: 2048 - type: number - sshKeys: - description: Array of `secretId`s of public SSH keys for logging into as - `defaultUser` with administrator/root privileges. Applies to Linux/BSD - systems. Please refer to Secrets Management API. + roles: + description: The roles as list of `roleId`s of the user. example: - - 123 - - 125 + - 1 + - 2 + - 3 + - 4 items: format: int64 type: integer type: array - createdDate: - description: The creation date for the instance - example: 2021-06-03T06:27:12Z - format: date-time + type: object + UpdateUserResponse: + example: + _links: + self: /v1/users/12345 + properties: + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + description: Links for easy navigation. + example: + self: /v1/users/12345 + required: + - _links + type: object + ClientResponse: + example: + clientId: DE-54321 + tenantId: DE + customerId: "54321" + id: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + secret: 7271e905-239e-4d15-a8c5-527743a58390 + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 type: string - cancelDate: - description: The date on which the instance will be cancelled - example: 2021-06-03 - format: date - maxLength: 10 - minLength: 0 - pattern: yyyy-mm-dd + customerId: + description: Your customer number + example: "54321" + minLength: 1 type: string - status: - $ref: '#/components/schemas/instanceStatus' - vHostId: - description: ID of host system - example: 73395 - format: int64 - type: integer - addOns: - items: - $ref: '#/components/schemas/AddOnResponse' - type: array - errorMessage: - description: Message in case of an error. + id: + description: Client's id + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 type: string - productType: - description: Instance's category depending on Product Id - enum: - - hdd - - ssd - - vds - - nvme - example: ssd + clientId: + description: IDM client id + example: DE-54321 type: string - defaultUser: - description: Default user name created for login during (re-)installation - with administrative privileges. Allowed values for Linux/BSD are `admin` - (use sudo to apply administrative privileges like root) or `root`. Allowed - values for Windows are `admin` (has administrative privileges like administrator) - or `administrator`. - enum: - - root - - admin - - administrator - example: root + secret: + description: IDM client secret + example: 7271e905-239e-4d15-a8c5-527743a58390 type: string required: - - addOns - - additionalIps - - cancelDate - - cpuCores - - createdDate + - clientId - customerId - - dataCenter - - diskMb - - displayName - - imageId - - instanceId - - ipConfig - - macAddress - - name - - osType - - productId - - productType - - ramMb - - region - - regionName - - sshKeys - - status + - id + - secret - tenantId - - vHostId type: object - FindInstanceResponse: + FindClientResponse: example: data: - - cancelDate: 2021-06-03T00:00:00.000+0000 - displayName: VPS - regionName: European Union (Germany) - instanceId: 100 - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - osType: Linux - defaultUser: root - sshKeys: - - 123 - - 125 - productType: ssd - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - dataCenter: European Union (Germany) 1 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - ramMb: 1024 - errorMessage: errorMessage - additionalIps: - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - diskMb: 2048 - macAddress: F2:65:50:F3:63:A1 - createdDate: 2021-06-03T06:27:12Z - cpuCores: 4 - vHostId: 73395 + - clientId: DE-54321 tenantId: DE - name: vmd12345 - region: EU - - cancelDate: 2021-06-03T00:00:00.000+0000 - displayName: VPS - regionName: European Union (Germany) - instanceId: 100 - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - osType: Linux - defaultUser: root - sshKeys: - - 123 - - 125 - productType: ssd - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - dataCenter: European Union (Germany) 1 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - ramMb: 1024 - errorMessage: errorMessage - additionalIps: - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - diskMb: 2048 - macAddress: F2:65:50:F3:63:A1 - createdDate: 2021-06-03T06:27:12Z - cpuCores: 4 - vHostId: 73395 + customerId: "54321" + id: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + secret: 7271e905-239e-4d15-a8c5-527743a58390 + - clientId: DE-54321 tenantId: DE - name: vmd12345 - region: EU + customerId: "54321" + id: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + secret: 7271e905-239e-4d15-a8c5-527743a58390 _links: - self: /v1/compute/instances/100 + self: /v1/users/client properties: data: items: - $ref: '#/components/schemas/InstanceResponse' + $ref: '#/components/schemas/ClientResponse' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/compute/instances/100 + self: /v1/users/client required: - _links - data type: object - PatchInstanceRequest: - example: - displayName: VPS - vncEnabled: true - properties: - displayName: - description: The display name of the instance - example: VPS - maxLength: 255 - type: string - vncEnabled: - description: Enable/Disable the VNC option for instance - example: true - type: boolean - type: object - PatchInstanceResponseData: + ClientSecretResponse: example: - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z tenantId: DE customerId: "54321" + secret: 7271e905-239e-4d15-a8c5-527743a58390 properties: tenantId: description: Your customer tenant id @@ -8043,117 +7791,275 @@ components: example: "54321" minLength: 1 type: string - instanceId: - description: Instance's id - example: 12345 - format: int64 - type: integer - createdDate: - description: Creation date of the instance - example: 2021-06-02T12:32:03.363Z - format: date-time + secret: + description: IDM client secret + example: 7271e905-239e-4d15-a8c5-527743a58390 + type: string + required: + - customerId + - secret + - tenantId + type: object + GenerateClientSecretResponse: + example: + data: + - tenantId: DE + customerId: "54321" + secret: 7271e905-239e-4d15-a8c5-527743a58390 + - tenantId: DE + customerId: "54321" + secret: 7271e905-239e-4d15-a8c5-527743a58390 + _links: + self: /v1/users/client/secret + properties: + data: + items: + $ref: '#/components/schemas/ClientSecretResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/users/client/secret + required: + - _links + - data + type: object + UserIsPasswordSetResponse: + example: + tenantId: DE + customerId: "54321" + isPasswordSet: false + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your customer number + example: "54321" + minLength: 1 type: string + isPasswordSet: + description: Indicates if the user has set a password for his account + example: false + type: boolean required: - - createdDate - customerId - - instanceId + - isPasswordSet - tenantId type: object - PatchInstanceResponse: + FindUserIsPasswordSetResponse: example: data: - - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z + - tenantId: DE + customerId: "54321" + isPasswordSet: false + - tenantId: DE + customerId: "54321" + isPasswordSet: false + _links: + self: /v1/users/is-password-set + properties: + data: + items: + $ref: '#/components/schemas/UserIsPasswordSetResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/users/is-password-set + required: + - _links + - data + type: object + ListRoleResponse: + example: + data: + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true tenantId: DE customerId: "54321" - - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z + name: infrastructure + admin: true + type: custom + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true tenantId: DE customerId: "54321" + name: infrastructure + admin: true + type: custom _links: - self: /v1/compute/instances/12345 + first: /v1/role/{roleType}/?page=1 + next: /v1/role/{roleType}/?page=19 + self: /v1/role/{roleType}/12345 + previous: /v1/role/{roleType}/?page=21 + last: /v1/role/{roleType}?page=101 + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/PatchInstanceResponseData' + $ref: '#/components/schemas/RoleResponse' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/compute/instances/12345 + first: /v1/role/{roleType}/?page=1 + next: /v1/role/{roleType}/?page=19 + self: /v1/role/{roleType}/12345 + previous: /v1/role/{roleType}/?page=21 + last: /v1/role/{roleType}?page=101 required: - _links + - _pagination - data type: object - ReinstallInstanceRequest: + PermissionRequest: example: - imageId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - userData: |- - #cloud-config - user: admin - timezone: Europe/Berlin - chpasswd: - expire: False - defaultUser: root - sshKeys: '[123, 125]' - applicationId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - rootPassword: 1 + apiName: infrastructure + resources: + - 1 + - 2 + - 3 + actions: + - CREATE + - READ properties: - imageId: - description: ImageId to be used to setup the compute instance. - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + apiName: + description: The name of the role. There is a limit of 255 characters per + role. + example: infrastructure + maxLength: 255 + minLength: 1 type: string - sshKeys: - description: Array of `secretId`s of public SSH keys for logging into as - `defaultUser` with administrator/root privileges. Applies to Linux/BSD - systems. Please refer to Secrets Management API. - example: '[123, 125]' + actions: + description: Action allowed for the API endpoint. Basically `CREATE` corresponds + to POST endpoints, `READ` to GET endpoints, `UPDATE` to PATCH / PUT endpoints + and `DELETE` to DELETE endpoints. + example: + - CREATE + - READ + items: + enum: + - CREATE + - READ + - UPDATE + - DELETE + type: string + type: array + resources: + description: The IDs of tags. Only if those tags are assgined to a resource + the user with that role will be able to access the resource. + example: + - 1 + - 2 + - 3 items: format: int64 type: integer type: array - rootPassword: - description: '`secretId` of the password for the `defaultUser` with administrator/root - privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer - to Secrets Management API.' - example: 1 - format: int64 - type: integer - userData: - description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize - during start of compute instance.' - example: |- - #cloud-config - user: admin - timezone: Europe/Berlin - chpasswd: - expire: False - type: string - defaultUser: - default: admin - description: Default user name created for login during (re-)installation - with administrative privileges. Allowed values for Linux/BSD are `admin` - (use sudo to apply administrative privileges like root) or `root`. Allowed - values for Windows are `admin` (has administrative privileges like administrator) - or `administrator`. - enum: - - root - - admin - - administrator - example: root - type: string - applicationId: - description: Application ID - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + required: + - actions + - apiName + type: object + CreateRoleRequest: + example: + permissions: + - apiName: infrastructure + resources: + - 1 + - 2 + - 3 + actions: + - CREATE + - READ + - apiName: infrastructure + resources: + - 1 + - 2 + - 3 + actions: + - CREATE + - READ + accessAllResources: false + name: infrastructure + admin: false + properties: + name: + description: The name of the role. There is a limit of 255 characters per + role. + example: infrastructure + maxLength: 255 + minLength: 1 type: string + admin: + description: If user is admin he will have permissions to all API endpoints + and resources. Enabling this will superseed all role definitions and `accessAllResources`. + example: false + type: boolean + accessAllResources: + description: Allow access to all resources. This will superseed all assigned + resources in a role. + example: false + type: boolean + permissions: + items: + $ref: '#/components/schemas/PermissionRequest' + type: array required: - - imageId + - accessAllResources + - admin + - name type: object - ReinstallInstanceResponseData: + CreateRoleResponseData: example: - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z + roleId: 12345 tenantId: DE customerId: "54321" properties: @@ -8167,404 +8073,251 @@ components: example: "54321" minLength: 1 type: string - instanceId: - description: Instance's id + roleId: + description: Role's id example: 12345 format: int64 type: integer - createdDate: - description: Creation date for instance - example: 2021-06-02T12:32:03.363Z - format: date-time - type: string required: - - createdDate - customerId - - instanceId + - roleId - tenantId type: object - ReinstallInstanceResponse: + CreateRoleResponse: example: data: - - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z + - roleId: 12345 tenantId: DE customerId: "54321" - - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z + - roleId: 12345 tenantId: DE customerId: "54321" _links: - self: /v1/compute/instances/12345 + self: /v1/roles/12345 properties: data: items: - $ref: '#/components/schemas/ReinstallInstanceResponseData' + $ref: '#/components/schemas/CreateRoleResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/compute/instances/12345 + self: /v1/roles/12345 required: - _links - data type: object - ExtraStorageRequest: - properties: - ssd: - description: Specify the size in TB and the quantity - items: - type: string - type: array - nvme: - description: Specify the size in TB and the quantity - items: - type: string - type: array - type: object - AddOnRequest: - properties: - id: - description: Id of the Addon. Please refer to list [here](https://contabo.com/en/product-list/?show_ids=true). - example: 1019 - format: int64 - type: integer - quantity: - description: The number of Addons you wish to aquire. - example: 4 - format: int64 - type: integer - required: - - id - - quantity - type: object - CreateInstanceAddons: - properties: - privateNetworking: - description: Set this attribute if you want to upgrade your instance with - the Private Networking addon. Please provide an empty object for the - time being as value. There will be more configuration possible in the - future. - example: {} - type: object - additionalIps: - description: Set this attribute if you want to upgrade your instance with - the Additional IPs addon. Please provide an empty object for the time - being as value. There will be more configuration possible in the future. - example: {} - type: object - extraStorage: - allOf: - - $ref: '#/components/schemas/ExtraStorageRequest' - description: Set this attribute if you want to upgrade your instance with - the Extra Storage addon. - example: {} - customImage: - description: Set this attribute if you want to upgrade your instance with - the Custom Images addon. Please provide an empty object for the time - being as value. There will be more configuration possible in the future. - example: {} - type: object - addonsIds: - items: - $ref: '#/components/schemas/AddOnRequest' - type: array - type: object - CreateInstanceRequest: + FindRoleResponse: example: - license: PleskHost - period: 6 - imageId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - userData: |- - #cloud-config - user: admin - timezone: Europe/Berlin - chpasswd: - expire: False - productId: V3 - displayName: VPS - addOns: - privateNetworking: {} - additionalIps: {} - extraStorage: {} - customImage: {} - defaultUser: root - sshKeys: '[123, 125]' - region: EU - applicationId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - rootPassword: 1 - properties: - imageId: - default: afecbb85-e2fc-46f0-9684-b46b1faf00bb - description: ImageId to be used to setup the compute instance. Default is - Ubuntu 22.04 - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - type: string - productId: - default: V1 - description: Default is V1 - example: V3 - minLength: 1 - type: string - region: - default: EU - description: Instance Region where the compute instance should be located. - Default is EU - enum: - - EU - - US-central - - US-east - - US-west - - SIN - - UK - - AUS - - JPN - example: EU - minLength: 1 - type: string - sshKeys: - description: Array of `secretId`s of public SSH keys for logging into as - `defaultUser` with administrator/root privileges. Applies to Linux/BSD - systems. Please refer to Secrets Management API. - example: '[123, 125]' - items: - format: int64 - type: integer - type: array - rootPassword: - description: '`secretId` of the password for the `defaultUser` with administrator/root - privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer - to Secrets Management API.' - example: 1 - format: int64 - type: integer - userData: - description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize - during start of compute instance.' - example: |- - #cloud-config - user: admin - timezone: Europe/Berlin - chpasswd: - expire: False - type: string - license: - description: Additional licence in order to enhance your chosen product, - mainly needed for software licenses on your product (not needed for windows). - enum: - - cPanel5 - - cPanel30 - - cPanel50 - - cPanel100 - - cPanel150 - - cPanel200 - - cPanel250 - - cPanel300 - - cPanel350 - - cPanel400 - - cPanel450 - - cPanel500 - - cPanel550 - - cPanel600 - - cPanel650 - - cPanel700 - - cPanel750 - - cPanel800 - - cPanel850 - - cPanel900 - - cPanel950 - - cPanel1000 - - PleskAdmin - - PleskHost - - PleskPro - example: PleskHost - type: string - period: - default: 1 - description: 'Initial contract period in months. Available periods are: - 1, 3, 6 and 12 months. Default to 1 month' - example: 6 - format: int64 - type: integer - displayName: - description: The display name of the instance - example: VPS - maxLength: 255 - type: string - defaultUser: - default: admin - description: Default user name created for login during (re-)installation - with administrative privileges. Allowed values for Linux/BSD are `admin` - (use sudo to apply administrative privileges like root) or `root`. Allowed - values for Windows are `admin` (has administrative privileges like administrator) - or `administrator`. - enum: - - root - - admin - - administrator - example: root - type: string - addOns: + data: + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + - roleId: 12345 + permissions: + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + resources: + - tagId: 12345 + tagName: Web + - tagId: 12345 + tagName: Web + actions: + - CREATE + - READ + accessAllResources: true + tenantId: DE + customerId: "54321" + name: infrastructure + admin: true + type: custom + _links: + self: /v1/roles/12345 + properties: + data: + items: + $ref: '#/components/schemas/RoleResponse' + type: array + _links: allOf: - - $ref: '#/components/schemas/CreateInstanceAddons' - description: Set attributes in the addons object for the corresponding ones - that need to be added to the instance + - $ref: '#/components/schemas/SelfLinks' example: - privateNetworking: {} - additionalIps: {} - extraStorage: {} - customImage: {} - applicationId: - description: Application ID - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - type: string + self: /v1/roles/12345 required: - - period - - productId + - _links + - data type: object - CreateInstanceResponseData: + UpdateRoleRequest: example: - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - tenantId: DE - customerId: "54321" - osType: Linux - sshKeys: - - 123 - - 125 - region: EU + permissions: + - apiName: infrastructure + resources: + - 1 + - 2 + - 3 + actions: + - CREATE + - READ + - apiName: infrastructure + resources: + - 1 + - 2 + - 3 + actions: + - CREATE + - READ + accessAllResources: false + name: infrastructure + admin: false properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" + name: + description: The name of the role. There is a limit of 255 characters per + role. + example: infrastructure + maxLength: 255 minLength: 1 type: string - instanceId: - description: Instance's id - example: 12345 - format: int64 - type: integer - createdDate: - description: Creation date for instance - example: 2021-06-02T12:32:03.363Z - format: date-time - type: string - imageId: - description: Image's id - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string - productId: - description: Product ID - example: V5 - type: string - region: - description: Instance Region where the compute instance should be located. - example: EU - type: string - addOns: + admin: + description: If user is admin he will have permissions to all API endpoints + and resources. Enabling this will superseed all role definitions and `accessAllResources`. + example: false + type: boolean + accessAllResources: + description: Allow access to all resources. This will superseed all assigned + resources in a role. + example: false + type: boolean + permissions: items: - $ref: '#/components/schemas/AddOnResponse' + $ref: '#/components/schemas/PermissionRequest' type: array - osType: - description: Type of operating system (OS) - example: Linux + required: + - accessAllResources + - admin + - name + type: object + UpdateRoleResponse: + example: + _links: + self: /v1/roles/12345 + properties: + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + description: Links for easy navigation. + example: + self: /v1/roles/12345 + required: + - _links + type: object + ApiPermissionsResponse: + example: + apiName: /v1/compute/instances + actions: + - CREATE + - READ + properties: + apiName: + description: API endpoint. In order to get a list availbale api enpoints + please refer to the GET api-permissions endpoint. + example: /v1/compute/instances type: string - status: - $ref: '#/components/schemas/instanceStatus' - sshKeys: - description: Array of `secretId`s of public SSH keys for logging into as - `defaultUser` with administrator/root privileges. Applies to Linux/BSD - systems. Please refer to Secrets Management API. + actions: + description: Action allowed for the API endpoint. Basically `CREATE` corresponds + to POST endpoints, `READ` to GET endpoints, `UPDATE` to PATCH / PUT endpoints + and `DELETE` to DELETE endpoints. example: - - 123 - - 125 + - CREATE + - READ items: - format: int64 - type: integer + enum: + - CREATE + - READ + - UPDATE + - DELETE + type: string type: array required: - - addOns - - createdDate - - customerId - - imageId - - instanceId - - osType - - productId - - region - - sshKeys - - status - - tenantId + - actions + - apiName type: object - CreateInstanceResponse: + ListApiPermissionResponse: example: data: - - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - tenantId: DE - customerId: "54321" - osType: Linux - sshKeys: - - 123 - - 125 - region: EU - - instanceId: 12345 - createdDate: 2021-06-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - productId: V5 - addOns: - - quantity: 4 - id: 1431 - - quantity: 4 - id: 1431 - tenantId: DE - customerId: "54321" - osType: Linux - sshKeys: - - 123 - - 125 - region: EU + - apiName: /v1/compute/instances + actions: + - CREATE + - READ + - apiName: /v1/compute/instances + actions: + - CREATE + - READ _links: - self: /v1/compute/instances/12345 + first: /v1/roles/api-permissions?page=1 + previous: /v1/roles/api-permissions?page=2 + next: /v1/roles/api-permissions?page=3 + last: /v1/roles/api-permissions?page=10 + self: /v1/roles/api-permissions properties: data: items: - $ref: '#/components/schemas/CreateInstanceResponseData' + $ref: '#/components/schemas/ApiPermissionsResponse' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/compute/instances/12345 + first: /v1/roles/api-permissions?page=1 + previous: /v1/roles/api-permissions?page=2 + next: /v1/roles/api-permissions?page=3 + last: /v1/roles/api-permissions?page=10 + self: /v1/roles/api-permissions required: - _links - data type: object - CancelInstanceResponseData: + CredentialData: example: - cancelDate: 2021-06-03T00:00:00.000+0000 - instanceId: 12345 + objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y + secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY + accessKey: AKIAIOSFODNN7EXAMPLE + displayName: Object Storage Test tenantId: DE customerId: "54321" + credentialId: 12345 + region: European Union (Germany) properties: tenantId: description: Your customer tenant id @@ -8576,89 +8329,128 @@ components: example: "54321" minLength: 1 type: string - instanceId: - description: Instance's id - example: 12345 - format: int64 - type: integer - cancelDate: - description: The date on which the instance will be cancelled - example: 2021-06-03 - format: date + accessKey: + description: Access key ID. + example: AKIAIOSFODNN7EXAMPLE + type: string + secretKey: + description: Secret key ID. + example: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY + type: string + objectStorageId: + description: Object Storage ID. + example: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y + type: string + displayName: + description: Object Storage Name. + example: Object Storage Test + type: string + region: + description: Object Storage Region. + example: European Union (Germany) type: string + credentialId: + description: Object Storage Credential ID + example: 12345 + type: number required: - - cancelDate + - accessKey + - credentialId - customerId - - instanceId + - displayName + - objectStorageId + - region + - secretKey - tenantId type: object - CancelInstanceResponse: + ListCredentialResponse: example: data: - - cancelDate: 2021-06-03T00:00:00.000+0000 - instanceId: 12345 + - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y + secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY + accessKey: AKIAIOSFODNN7EXAMPLE + displayName: Object Storage Test tenantId: DE customerId: "54321" - - cancelDate: 2021-06-03T00:00:00.000+0000 - instanceId: 12345 + credentialId: 12345 + region: European Union (Germany) + - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y + secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY + accessKey: AKIAIOSFODNN7EXAMPLE + displayName: Object Storage Test tenantId: DE customerId: "54321" + credentialId: 12345 + region: European Union (Germany) _links: - self: /v1/compute/instances/12345 + first: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=1 + next: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=19 + self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials/12345 + previous: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=21 + last: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=101 + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/CancelInstanceResponseData' + $ref: '#/components/schemas/CredentialData' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/compute/instances/12345 + first: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=1 + next: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=19 + self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials/12345 + previous: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=21 + last: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=101 required: - _links + - _pagination - data type: object - FirewallingUpgradeRequest: + FindCredentialResponse: + example: + data: + - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y + secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY + accessKey: AKIAIOSFODNN7EXAMPLE + displayName: Object Storage Test + tenantId: DE + customerId: "54321" + credentialId: 12345 + region: European Union (Germany) + - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y + secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY + accessKey: AKIAIOSFODNN7EXAMPLE + displayName: Object Storage Test + tenantId: DE + customerId: "54321" + credentialId: 12345 + region: European Union (Germany) + _links: + self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/e3f0207c-f7fe-433a-92ab-39a9e976642d/credentials properties: - assignFirewalls: - description: List of IDs of firewalls the upgraded instance should be assigned - to immediately. If the list is empty or this property is not provided - the instance will be assigned to your current default firewall. + data: items: - type: string + $ref: '#/components/schemas/CredentialData' type: array - type: object - PrivateNetworkingUpgradeRequest: - properties: {} - type: object - AddOnQuantityRequest: - properties: - quantity: - description: The number of Addons you wish to aquire. - example: 4 - format: int64 - type: integer - required: - - quantity - type: object - UpgradeInstanceRequest: - example: - privateNetworking: {} - properties: - privateNetworking: + _links: allOf: - - $ref: '#/components/schemas/PrivateNetworkingUpgradeRequest' - description: Set this attribute if you want to upgrade your instance with - the Private Networking addon. Please provide an empty object for the time - being as value. There will be more configuration possible in the future. - example: {} + - $ref: '#/components/schemas/SelfLinks' + example: + self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/e3f0207c-f7fe-433a-92ab-39a9e976642d/credentials + required: + - _links + - data type: object - InstancesActionsAuditResponse: + UserAuditResponse: example: traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -8669,11 +8461,12 @@ components: name: test1 action: CREATED id: 12345 + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 timestamp: 2021-03-30T11:35:06.177Z username: John.Doe properties: id: - description: The ID of the audit entry. + description: The identifier of the audit entry. example: 12345 format: int64 type: integer @@ -8696,13 +8489,13 @@ components: minLength: 1 type: string customerId: - description: Customer ID + description: Customer number example: "54321" minLength: 1 type: string changedBy: - description: Id of user who performed the change - example: c4c800ff-e524-47dd-9543-71dfc8b91113 + description: User ID + example: "54321" minLength: 1 type: string username: @@ -8717,12 +8510,10 @@ components: description: The traceId of the API call which led to the change. example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - instanceId: - description: The identifier of the instancesActions - example: 12345 - format: int64 - minimum: 0 - type: integer + userId: + description: The identifier of the user + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + type: string changes: description: List of actual changes. example: @@ -8736,19 +8527,18 @@ components: - changedBy - customerId - id - - instanceId - requestId - tenantId - timestamp - traceId + - userId - username type: object - ListInstancesActionsAuditResponse: + ListUserAuditResponse: example: data: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -8759,11 +8549,11 @@ components: name: test1 action: CREATED id: 12345 + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 timestamp: 2021-03-30T11:35:06.177Z username: John.Doe - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -8774,14 +8564,15 @@ components: name: test1 action: CREATED id: 12345 + userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 timestamp: 2021-03-30T11:35:06.177Z username: John.Doe _links: - first: /v1/compute/instances/actions/audits?page=2 - previous: /v1/compute/instances/actions/audits?page=2 - next: /v1/compute/instances/actions/audits?page=3 - last: /v1/compute/instances/actions/audits?page=10 - self: /v1/compute/instances/actions/audits + first: /v1/users/audits?page=2 + previous: /v1/users/audits?page=2 + next: /v1/users/audits?page=3 + last: /v1/users/audits?page=10 + self: /v1/users/audits _pagination: "" properties: _pagination: @@ -8790,28 +8581,28 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/InstancesActionsAuditResponse' + $ref: '#/components/schemas/UserAuditResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/compute/instances/actions/audits?page=2 - previous: /v1/compute/instances/actions/audits?page=2 - next: /v1/compute/instances/actions/audits?page=3 - last: /v1/compute/instances/actions/audits?page=10 - self: /v1/compute/instances/actions/audits + first: /v1/users/audits?page=2 + previous: /v1/users/audits?page=2 + next: /v1/users/audits?page=3 + last: /v1/users/audits?page=10 + self: /v1/users/audits required: - _links - _pagination - data type: object - InstancesAuditResponse: + RoleAuditResponse: example: traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + roleId: 12345 tenantId: DE customerId: "54321" changes: @@ -8825,7 +8616,7 @@ components: username: John.Doe properties: id: - description: The ID of the audit entry. + description: The identifier of the audit entry. example: 12345 format: int64 type: integer @@ -8848,13 +8639,13 @@ components: minLength: 1 type: string customerId: - description: Customer ID + description: Customer number example: "54321" minLength: 1 type: string changedBy: - description: Id of user who performed the change - example: c4c800ff-e524-47dd-9543-71dfc8b91113 + description: User ID + example: "54321" minLength: 1 type: string username: @@ -8869,12 +8660,11 @@ components: description: The traceId of the API call which led to the change. example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - instanceId: - description: The identifier of the instance + roleId: + description: The identifier of the role example: 12345 - format: int64 minimum: 0 - type: integer + type: number changes: description: List of actual changes. example: @@ -8888,20 +8678,20 @@ components: - changedBy - customerId - id - - instanceId - requestId + - roleId - tenantId - timestamp - traceId - username type: object - ListInstancesAuditResponse: + ListRoleAuditResponse: example: data: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + roleId: 12345 tenantId: DE customerId: "54321" changes: @@ -8914,9 +8704,9 @@ components: timestamp: 2021-03-30T11:35:06.177Z username: John.Doe - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + roleId: 12345 tenantId: DE customerId: "54321" changes: @@ -8924,234 +8714,199 @@ components: name: test new: name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe - _links: - first: /v1/compute/instances/audits?page=2 - previous: /v1/compute/instances/audits?page=2 - next: /v1/compute/instances/audits?page=3 - last: /v1/compute/instances/audits?page=10 - self: /v1/compute/instances/audits - _pagination: "" + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe + _links: + first: /v1/roles/audits?page=2 + previous: /v1/roles/audits?page=2 + next: /v1/roles/audits?page=3 + last: /v1/roles/audits?page=10 + self: /v1/roles/audits properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/InstancesAuditResponse' + $ref: '#/components/schemas/RoleAuditResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/compute/instances/audits?page=2 - previous: /v1/compute/instances/audits?page=2 - next: /v1/compute/instances/audits?page=3 - last: /v1/compute/instances/audits?page=10 - self: /v1/compute/instances/audits + first: /v1/roles/audits?page=2 + previous: /v1/roles/audits?page=2 + next: /v1/roles/audits?page=3 + last: /v1/roles/audits?page=10 + self: /v1/roles/audits required: - _links - - _pagination - data type: object - TagResponse: - example: - tagId: 12345 - tagName: Web-Server + AutoScalingTypeResponse: properties: - tagId: - description: Tag's id - example: 12345 + state: + description: State of the autoscaling for the current object storage. + enum: + - enabled + - disabled + - error + example: enabled + type: string + sizeLimitTB: + description: Autoscaling size limit for the current object storage. + example: 1 + format: double type: number - tagName: - description: Tag's name - example: Web-Server - maxLength: 255 - minLength: 1 + errorMessage: + description: Error message type: string required: - - tagId - - tagName + - sizeLimitTB + - state type: object - ListImageResponseData: + ObjectStorageResponse: example: - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - lastModifiedDate: 2021-06-04T06:27:12Z - format: iso - errorMessage: Error downloading image from provided URL - description: Ubuntu Server 20.04.2 LTS - sizeMb: 1024 - creationDate: 2021-06-03T06:27:12Z - version: 20.04.2 - url: https://example.com/image.qcow2 - tags: - - tagId: 12345 - tagName: Web-Server - - tagId: 12345 - tagName: Web-Server - uploadedSizeMb: 1024 + objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE - customerId: "12345" - name: Custom Image Ubuntu - osType: Linux - status: Pending - standardImage: true + customerId: "54321" + region: European Union (Germany) + status: READY properties: - imageId: - description: Image's id - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string tenantId: description: Your customer tenant id - enum: - - DE - - INT example: DE minLength: 1 type: string customerId: - description: Customer ID - example: "12345" + description: Your customer number + example: "54321" minLength: 1 type: string - name: - description: Image Name - example: Custom Image Ubuntu + objectStorageId: + description: Your object storage id + example: b943b25a-c8b5-4570-9135-4bbaa7615b81 + minLength: 1 type: string - description: - description: Image Description - example: Ubuntu Server 20.04.2 LTS + createdDate: + description: Creation date for object storage. + example: 2021-06-02T12:32:03.363Z + format: date-time type: string - url: - description: URL from where the image has been downloaded / provided. - example: https://example.com/image.qcow2 + cancelDate: + description: Cancellation date for object storage. + example: 2021-06-02 + format: date type: string - sizeMb: - description: Image Size in MB - example: 1024 - type: number - uploadedSizeMb: - description: Image Uploaded Size in MB - example: 1024 - type: number - osType: - description: Type of operating system (OS) - example: Linux + autoScaling: + allOf: + - $ref: '#/components/schemas/AutoScalingTypeResponse' + description: Autoscaling settings + dataCenter: + description: Data center your object storage is located + example: EU + minLength: 1 type: string - version: - description: Version number to distinguish the contents of an image. Could - be the version of the operating system for example. - example: 20.04.2 + totalPurchasedSpaceTB: + description: Amount of purchased / requested object storage in TB. + example: 6.25 + format: double + type: number + s3Url: + description: S3 URL to connect to your S3 compatible object storage + example: eu1-s3.contabo.com type: string - format: - description: Image format - enum: - - iso - - qcow2 - example: iso + s3TenantId: + description: Your S3 tenantId. Only required for public sharing. + example: 2cd2e5e1444a41b0bed16c6410ecaa84 type: string status: - description: Image status (e.g. if image is still downloading) - example: Pending - type: string - errorMessage: - description: Image download error message - example: Error downloading image from provided URL + description: The object storage status + enum: + - READY + - PROVISIONING + - UPGRADING + - CANCELLED + - ERROR + - ENABLED + - DISABLED + - MANUAL_PROVISIONING + - PRODUCT_NOT_AVAILABLE + - LIMIT_EXCEEDED + - VERIFICATION_REQUIRED + - COMPLETED + - ORDER_PROCESSING + - PENDING_PAYMENT + - UNKNOWN + example: READY type: string - standardImage: - description: Flag indicating that image is either a standard (true) or a - custom image (false) - example: true - type: boolean - creationDate: - description: The creation date time for the image - example: 2021-06-03T06:27:12Z - format: date-time + region: + description: The region where your object storage is located + example: European Union (Germany) type: string - lastModifiedDate: - description: The last modified date time for the image - example: 2021-06-04T06:27:12Z - format: date-time + displayName: + description: Display name for object storage. + example: Object storage 1 + maxLength: 255 + minLength: 1 type: string - tags: - description: The tags assigned to the image - items: - $ref: '#/components/schemas/TagResponse' - type: array required: - - creationDate + - autoScaling + - cancelDate + - createdDate - customerId - - description - - errorMessage - - format - - imageId - - lastModifiedDate - - name - - osType - - sizeMb - - standardImage + - dataCenter + - displayName + - objectStorageId + - region + - s3TenantId + - s3Url - status - - tags - tenantId - - uploadedSizeMb - - url - - version + - totalPurchasedSpaceTB type: object - ListImageResponse: + ListObjectStorageResponse: example: - data: - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - lastModifiedDate: 2021-06-04T06:27:12Z - format: iso - errorMessage: Error downloading image from provided URL - description: Ubuntu Server 20.04.2 LTS - sizeMb: 1024 - creationDate: 2021-06-03T06:27:12Z - version: 20.04.2 - url: https://example.com/image.qcow2 - tags: - - tagId: 12345 - tagName: Web-Server - - tagId: 12345 - tagName: Web-Server - uploadedSizeMb: 1024 + data: + - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE - customerId: "12345" - name: Custom Image Ubuntu - osType: Linux - status: Pending - standardImage: true - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - lastModifiedDate: 2021-06-04T06:27:12Z - format: iso - errorMessage: Error downloading image from provided URL - description: Ubuntu Server 20.04.2 LTS - sizeMb: 1024 - creationDate: 2021-06-03T06:27:12Z - version: 20.04.2 - url: https://example.com/image.qcow2 - tags: - - tagId: 12345 - tagName: Web-Server - - tagId: 12345 - tagName: Web-Server - uploadedSizeMb: 1024 + customerId: "54321" + region: European Union (Germany) + status: READY + - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE - customerId: "12345" - name: Custom Image Ubuntu - osType: Linux - status: Pending - standardImage: true + customerId: "54321" + region: European Union (Germany) + status: READY _links: - first: /v1/compute/images?page=1 - previous: /v1/compute/images?page=19 - self: /v1/compute/images?page=20 - next: /v1/compute/images?page=21 - last: /v1/compute/images?page=101 + first: /v1/object-storages?size=10 + previous: /v1/object-storages?page=1&size=10 + next: /v1/object-storages?page=3&size=10 + last: /v1/object-storages?page=5&size=10 + self: /v1/object-storages _pagination: "" properties: _pagination: @@ -9160,68 +8915,72 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ListImageResponseData' + $ref: '#/components/schemas/ObjectStorageResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/compute/images?page=1 - previous: /v1/compute/images?page=19 - self: /v1/compute/images?page=20 - next: /v1/compute/images?page=21 - last: /v1/compute/images?page=101 + first: /v1/object-storages?size=10 + previous: /v1/object-storages?page=1&size=10 + next: /v1/object-storages?page=3&size=10 + last: /v1/object-storages?page=5&size=10 + self: /v1/object-storages required: - _links - _pagination - data type: object - CreateCustomImageRequest: + DataCenterResponse: example: - name: Ubuntu Custom Image - osType: Linux - description: Ubuntu Server 20.04.2 LTS - version: 20.04.2 - url: https://example.com/image.qcow2 + s3Url: eu1-s3.contabo.com + capabilities: + - VPS + - Object-Storage + regionSlug: EU + regionName: European Union (Germany) + name: European Union (Germany) 1 + tenantId: DE + customerId: "54321" + slug: EU1 properties: name: - description: Image Name - example: Ubuntu Custom Image + description: Name of the data center + example: European Union (Germany) 1 + minLength: 1 type: string - description: - description: Image Description - example: Ubuntu Server 20.04.2 LTS + slug: + description: Slug of the data center + example: EU1 + minLength: 1 type: string - url: - description: URL from where the image has been downloaded / provided. - example: https://example.com/image.qcow2 + capabilities: + example: + - VPS + - Object-Storage + items: + enum: + - VPS + - VDS + - Object-Storage + - Private-Networking + type: string + type: array + s3Url: + description: S3 URL of the data center + example: eu1-s3.contabo.com + minLength: 1 type: string - osType: - description: Provided type of operating system (OS). Please specify `Windows` - for MS Windows and `Linux` for other OS. Specifying wrong OS type may - lead to disfunctional cloud instance. - enum: - - Windows - - Linux - example: Linux + regionName: + description: Name of the region + example: European Union (Germany) + minLength: 1 type: string - version: - description: Version number to distinguish the contents of an image. Could - be the version of the operating system for example. - example: 20.04.2 + regionSlug: + description: Slug of the region + example: EU + minLength: 1 type: string - required: - - name - - osType - - url - - version - type: object - CreateCustomImageResponseData: - example: - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - tenantId: DE - customerId: "54321" - properties: tenantId: description: Your customer tenant id example: DE @@ -9232,238 +8991,386 @@ components: example: "54321" minLength: 1 type: string - imageId: - description: Image's id - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string required: + - capabilities - customerId - - imageId + - name + - regionName + - regionSlug + - s3Url + - slug - tenantId type: object - CreateCustomImageResponse: + ListDataCenterResponse: example: data: - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + - s3Url: eu1-s3.contabo.com + capabilities: + - VPS + - Object-Storage + regionSlug: EU + regionName: European Union (Germany) + name: European Union (Germany) 1 tenantId: DE customerId: "54321" - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + slug: EU1 + - s3Url: eu1-s3.contabo.com + capabilities: + - VPS + - Object-Storage + regionSlug: EU + regionName: European Union (Germany) + name: European Union (Germany) 1 tenantId: DE customerId: "54321" + slug: EU1 _links: - self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + first: /v1/data-centers?page=1 + previous: /v1/data-centers?page=19 + self: /v1/data-centers/12345 + next: /v1/data-centers?page=21 + last: /v1/data-centers?page=101 + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/CreateCustomImageResponseData' + $ref: '#/components/schemas/DataCenterResponse' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + first: /v1/data-centers?page=1 + previous: /v1/data-centers?page=19 + self: /v1/data-centers/12345 + next: /v1/data-centers?page=21 + last: /v1/data-centers?page=101 required: - _links + - _pagination - data type: object - CreateCustomImageFailResponse: + AutoScalingTypeRequest: properties: - message: - description: 'Unsupported Media Type: Please provide a direct link to an - .iso or .qcow2 image.' - example: Unsupported Media Type + state: + description: State of the autoscaling for the current object storage. + enum: + - enabled + - disabled + example: enabled + type: string + sizeLimitTB: + description: Autoscaling size limit for the current object storage. + example: 1 + format: double + type: number + required: + - sizeLimitTB + - state + type: object + CreateObjectStorageRequest: + example: + autoScaling: "" + displayName: Object storage 1 + region: EU + totalPurchasedSpaceTB: 6 + properties: + region: + default: EU + description: 'Region where the object storage should be located. Default + is EU. Available regions: EU, US-central, SIN' + example: EU + minLength: 1 + type: string + autoScaling: + allOf: + - $ref: '#/components/schemas/AutoScalingTypeRequest' + description: Autoscaling settings + totalPurchasedSpaceTB: + description: Amount of purchased / requested object storage in TB. + example: 6 + format: double + type: number + displayName: + description: Display name helps to differentiate between object storages, + especially if they are in the same region. If display name is not provided, + it will be generated. Display name can be changed any time. + example: Object storage 1 + maxLength: 255 + minLength: 1 type: string - statusCode: - description: statuscode:415 - example: 415 - type: integer required: - - message - - statusCode + - region + - totalPurchasedSpaceTB type: object - ImageResponse: + CreateObjectStorageResponseData: example: - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - lastModifiedDate: 2021-06-04T06:27:12Z - format: iso - errorMessage: Error downloading image from provided URL - description: Ubuntu Server 20.04.2 LTS - sizeMb: 1024 - creationDate: 2021-06-03T06:27:12Z - version: 20.04.2 - url: https://example.com/image.qcow2 - uploadedSizeMb: 1024 + objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + usedSpacePercentage: 100 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z + usedSpaceTB: 4 tenantId: DE - customerId: "12345" - name: Custom Image Ubuntu - osType: Linux - status: Pending - standardImage: true + customerId: "54321" + region: European Union (Germany) + status: READY properties: - imageId: - description: Image's id - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string tenantId: description: Your customer tenant id - enum: - - DE - - INT example: DE minLength: 1 type: string customerId: - description: Customer ID - example: "12345" + description: Your customer number + example: "54321" minLength: 1 type: string - name: - description: Image Name - example: Custom Image Ubuntu + objectStorageId: + description: Your object storage id + example: b943b25a-c8b5-4570-9135-4bbaa7615b81 + minLength: 1 type: string - description: - description: Image Description - example: Ubuntu Server 20.04.2 LTS + createdDate: + description: Creation date for object storage. + example: 2021-06-02T12:32:03.363Z + format: date-time type: string - url: - description: URL from where the image has been downloaded / provided. - example: https://example.com/image.qcow2 + cancelDate: + description: Cancellation date for object storage. + example: 2021-06-02 + format: date type: string - sizeMb: - description: Image Size in MB - example: 1024 + autoScaling: + allOf: + - $ref: '#/components/schemas/AutoScalingTypeResponse' + description: Autoscaling settings + dataCenter: + description: The data center of the storage + example: EU + minLength: 1 + type: string + totalPurchasedSpaceTB: + description: Amount of purchased / requested object storage in TB. + example: 6.25 + format: double type: number - uploadedSizeMb: - description: Image Uploaded Size in MB - example: 1024 + usedSpaceTB: + description: Currently used space in TB. + example: 4 + format: double type: number - osType: - description: Type of operating system (OS) - example: Linux - type: string - version: - description: Version number to distinguish the contents of an image. Could - be the version of the operating system for example. - example: 20.04.2 + usedSpacePercentage: + description: Currently used space in percentage. + example: 100 + format: double + maximum: 100 + minimum: 0 + type: number + s3Url: + description: S3 URL to connect to your S3 compatible object storage + example: eu1-s3.contabo.com type: string - format: - description: Image format - enum: - - iso - - qcow2 - example: iso + s3TenantId: + description: Your S3 tenantId. Only required for public sharing. + example: 2cd2e5e1444a41b0bed16c6410ecaa84 type: string status: - description: Image status (e.g. if image is still downloading) - example: Pending - type: string - errorMessage: - description: Image download error message - example: Error downloading image from provided URL + description: The object storage status + enum: + - READY + - PROVISIONING + - UPGRADING + - CANCELLED + - ERROR + - ENABLED + - DISABLED + - MANUAL_PROVISIONING + - PRODUCT_NOT_AVAILABLE + - LIMIT_EXCEEDED + - VERIFICATION_REQUIRED + - COMPLETED + - ORDER_PROCESSING + - PENDING_PAYMENT + - UNKNOWN + example: READY + minLength: 1 type: string - standardImage: - description: Flag indicating that image is either a standard (true) or a - custom image (false) - example: true - type: boolean - creationDate: - description: The creation date time for the image - example: 2021-06-03T06:27:12Z - format: date-time + region: + description: The region where your object storage is located + example: European Union (Germany) type: string - lastModifiedDate: - description: The last modified date time for the image - example: 2021-06-04T06:27:12Z - format: date-time + displayName: + description: Display name for object storage. + example: Object storage 1 + maxLength: 255 + minLength: 1 type: string required: - - creationDate + - autoScaling + - cancelDate + - createdDate - customerId - - description - - errorMessage - - format - - imageId - - lastModifiedDate - - name - - osType - - sizeMb - - standardImage + - dataCenter + - displayName + - objectStorageId + - region + - s3TenantId + - s3Url - status - tenantId - - uploadedSizeMb - - url - - version + - totalPurchasedSpaceTB + - usedSpacePercentage + - usedSpaceTB type: object - FindImageResponse: + CreateObjectStorageResponse: example: data: - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - lastModifiedDate: 2021-06-04T06:27:12Z - format: iso - errorMessage: Error downloading image from provided URL - description: Ubuntu Server 20.04.2 LTS - sizeMb: 1024 - creationDate: 2021-06-03T06:27:12Z - version: 20.04.2 - url: https://example.com/image.qcow2 - uploadedSizeMb: 1024 + - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + usedSpacePercentage: 100 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z + usedSpaceTB: 4 + tenantId: DE + customerId: "54321" + region: European Union (Germany) + status: READY + - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + usedSpacePercentage: 100 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z + usedSpaceTB: 4 + tenantId: DE + customerId: "54321" + region: European Union (Germany) + status: READY + _links: + self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 + properties: + data: + items: + $ref: '#/components/schemas/CreateObjectStorageResponseData' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 + required: + - _links + - data + type: object + FindObjectStorageResponse: + example: + data: + - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE - customerId: "12345" - name: Custom Image Ubuntu - osType: Linux - status: Pending - standardImage: true - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - lastModifiedDate: 2021-06-04T06:27:12Z - format: iso - errorMessage: Error downloading image from provided URL - description: Ubuntu Server 20.04.2 LTS - sizeMb: 1024 - creationDate: 2021-06-03T06:27:12Z - version: 20.04.2 - url: https://example.com/image.qcow2 - uploadedSizeMb: 1024 + customerId: "54321" + region: European Union (Germany) + status: READY + - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 + cancelDate: 2021-06-02T00:00:00.000+0000 + s3Url: eu1-s3.contabo.com + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 + totalPurchasedSpaceTB: 6.25 + s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE - customerId: "12345" - name: Custom Image Ubuntu - osType: Linux - status: Pending - standardImage: true + customerId: "54321" + region: European Union (Germany) + status: READY _links: - self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 properties: data: items: - $ref: '#/components/schemas/ImageResponse' + $ref: '#/components/schemas/ObjectStorageResponse' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 required: - _links - data type: object - UpdateCustomImageRequest: - example: - name: Ubuntu Custom Image - description: Ubuntu 20.04 image + UpgradeAutoScalingType: properties: - name: - description: Image Name - example: Ubuntu Custom Image - type: string - description: - description: Image Description - example: Ubuntu 20.04 image + state: + description: State of the autoscaling for the current object storage. + enum: + - enabled + - disabled + example: enabled type: string + sizeLimitTB: + description: Autoscaling size limit for the current object storage. + example: 6 + format: double + type: number type: object - UpdateCustomImageResponseData: + UpgradeObjectStorageRequest: example: - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + autoScaling: "" + totalPurchasedSpaceTB: 8 + properties: + autoScaling: + allOf: + - $ref: '#/components/schemas/UpgradeAutoScalingType' + description: New monthly object storage size limit for autoscaling if enabled. + totalPurchasedSpaceTB: + description: New total object storage limit. If this number is larger than + before you will also be billed for the added storage space. No downgrade + possible. + example: 8 + format: double + type: number + type: object + UpgradeObjectStorageResponseData: + example: + objectStorageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + s3Url: eu1-s3.contabo.com + createdDate: 2021-06-02T12:32:03.363Z + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 tenantId: DE customerId: "54321" + region: European Union (Germany) + totalPurchasedSpaceTB: 6 + status: READY properties: tenantId: description: Your customer tenant id @@ -9475,48 +9382,123 @@ components: example: "54321" minLength: 1 type: string - imageId: - description: Image's id + objectStorageId: + description: Object storage id example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + minLength: 1 + type: string + createdDate: + description: Creation date for object storage. + example: 2021-06-02T12:32:03.363Z + type: string + dataCenter: + description: Data center of the object storage. + example: EU + type: string + autoScaling: + allOf: + - $ref: '#/components/schemas/AutoScalingTypeResponse' + description: The autoscaling limit of the object storage. + s3Url: + description: S3 URL to connect to your S3 compatible object storage + example: eu1-s3.contabo.com + type: string + status: + description: The object storage status + enum: + - READY + - PROVISIONING + - UPGRADING + - CANCELLED + - ERROR + - ENABLED + - DISABLED + - MANUAL_PROVISIONING + - PRODUCT_NOT_AVAILABLE + - LIMIT_EXCEEDED + - VERIFICATION_REQUIRED + - COMPLETED + - ORDER_PROCESSING + - PENDING_PAYMENT + - UNKNOWN + example: READY + type: string + totalPurchasedSpaceTB: + description: Total purchased object storage space in TB. + example: 6 + format: double + type: number + region: + description: The region where your object storage is located + example: European Union (Germany) + type: string + displayName: + description: Display name for object storage. + example: Object storage 1 + maxLength: 255 + minLength: 1 type: string required: + - autoScaling + - createdDate - customerId - - imageId + - dataCenter + - displayName + - objectStorageId + - region + - s3Url + - status - tenantId + - totalPurchasedSpaceTB type: object - UpdateCustomImageResponse: + UpgradeObjectStorageResponse: example: data: - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + - objectStorageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + s3Url: eu1-s3.contabo.com + createdDate: 2021-06-02T12:32:03.363Z + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 tenantId: DE customerId: "54321" - - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + region: European Union (Germany) + totalPurchasedSpaceTB: 6 + status: READY + - objectStorageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + s3Url: eu1-s3.contabo.com + createdDate: 2021-06-02T12:32:03.363Z + autoScaling: "" + dataCenter: EU + displayName: Object storage 1 tenantId: DE customerId: "54321" + region: European Union (Germany) + totalPurchasedSpaceTB: 6 + status: READY _links: - self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d properties: - data: - items: - $ref: '#/components/schemas/UpdateCustomImageResponseData' - type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + data: + items: + $ref: '#/components/schemas/UpgradeObjectStorageResponseData' + type: array required: - _links - data type: object - CustomImagesStatsResponseData: + ObjectStoragesStatsResponseData: example: - currentImagesCount: 4 - usedSizeMb: 55000 + usedSpaceTB: 4 + numberOfObjects: 2 + usedSpacePercentage: 100 tenantId: DE customerId: "54321" - freeSizeMb: 47400 - totalSizeMb: 102400 properties: tenantId: description: Your customer tenant id @@ -9528,73 +9510,66 @@ components: example: "54321" minLength: 1 type: string - currentImagesCount: - description: The number of existing custom images + usedSpaceTB: + description: Currently used space in TB. example: 4 + format: double type: number - totalSizeMb: - description: Total available disk space in MB - example: 102400 - type: number - usedSizeMb: - description: Used disk space in MB - example: 55000 - type: number - freeSizeMb: - description: Free disk space in MB - example: 47400 + usedSpacePercentage: + description: Currently used space in percentage. + example: 100 + format: double + maximum: 100 + minimum: 0 type: number + numberOfObjects: + description: Number of all objects (i.e. files and folders) in object storage. + example: 2 + format: int64 + type: integer required: - - currentImagesCount - customerId - - freeSizeMb + - numberOfObjects - tenantId - - totalSizeMb - - usedSizeMb + - usedSpacePercentage + - usedSpaceTB type: object - CustomImagesStatsResponse: + ObjectStoragesStatsResponse: example: data: - - currentImagesCount: 4 - usedSizeMb: 55000 - tenantId: DE - customerId: "54321" - freeSizeMb: 47400 - totalSizeMb: 102400 - - currentImagesCount: 4 - usedSizeMb: 55000 + - usedSpaceTB: 4 + numberOfObjects: 2 + usedSpacePercentage: 100 + tenantId: DE + customerId: "54321" + - usedSpaceTB: 4 + numberOfObjects: 2 + usedSpacePercentage: 100 tenantId: DE customerId: "54321" - freeSizeMb: 47400 - totalSizeMb: 102400 _links: - self: /v1/compute/images/stats + self: /v1/object-storages/stats/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 properties: data: items: - $ref: '#/components/schemas/CustomImagesStatsResponseData' + $ref: '#/components/schemas/ObjectStoragesStatsResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/compute/images/stats + self: /v1/object-storages/stats/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 required: - _links - data type: object - SnapshotResponse: + CancelObjectStorageResponseData: example: - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 + objectStorageId: objectStorageId + cancelDate: 2021-06-02T00:00:00.000+0000 + displayName: Object storage 1 tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description + customerId: "54321" properties: tenantId: description: Your customer tenant id @@ -9603,411 +9578,352 @@ components: type: string customerId: description: Your customer number - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + example: "54321" minLength: 1 type: string - snapshotId: - description: Snapshot's id - example: snap1628603855 + objectStorageId: + description: Object Storage id type: string - name: - description: The name of the snapshot. - example: Snapshot-Server - maxLength: 255 - minLength: 1 + cancelDate: + description: Cancellation date for object storage. + example: 2021-06-02 + format: date type: string - description: - description: The description of the snapshot. - example: Snapshot-Description + displayName: + description: Display name for object storage. + example: Object storage 1 maxLength: 255 minLength: 1 type: string - instanceId: - description: The instance identifier associated with the snapshot - example: 1234 - format: int64 - type: integer - createdDate: - description: The date when the snapshot was created - example: 2021-06-02T12:32:03.363Z - format: date-time - type: string - autoDeleteDate: - description: The date when the snapshot will be auto-deleted - example: 2021-07-02T12:32:03.363Z - format: date-time - type: string - imageId: - description: Image Id the snapshot was taken on - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string - imageName: - description: Image name the snapshot was taken on - example: ubuntu-18.04 - type: string required: - - autoDeleteDate - - createdDate + - cancelDate - customerId - - description - - imageId - - imageName - - instanceId - - name - - snapshotId + - displayName + - objectStorageId - tenantId type: object - ListSnapshotResponse: + CancelObjectStorageResponse: example: data: - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 + - objectStorageId: objectStorageId + cancelDate: 2021-06-02T00:00:00.000+0000 + displayName: Object storage 1 tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 + customerId: "54321" + - objectStorageId: objectStorageId + cancelDate: 2021-06-02T00:00:00.000+0000 + displayName: Object storage 1 tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description + customerId: "54321" _links: - first: /v1/compute/instances/12345/snapshots?page=1 - next: /v1/compute/instances/12345/snapshots?page=19 - self: /v1/compute/instances/12345/snapshots/snap1628603855 - previous: /v1/compute/instances/12345/snapshots?page=21 - last: /v1/compute/instances/12345/snapshots?page=101 - _pagination: "" + self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d properties: - _pagination: + _links: allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d data: items: - $ref: '#/components/schemas/SnapshotResponse' + $ref: '#/components/schemas/CancelObjectStorageResponseData' type: array - _links: - allOf: - - $ref: '#/components/schemas/Links' - example: - first: /v1/compute/instances/12345/snapshots?page=1 - next: /v1/compute/instances/12345/snapshots?page=19 - self: /v1/compute/instances/12345/snapshots/snap1628603855 - previous: /v1/compute/instances/12345/snapshots?page=21 - last: /v1/compute/instances/12345/snapshots?page=101 required: - _links - - _pagination - data type: object - CreateSnapshotRequest: + PatchObjectStorageRequest: example: - name: Snapshot-Server - description: Snapshot-Description + displayName: Object storage 1 properties: - name: - description: The name of the snapshot. It may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - snapshot. - example: Snapshot-Server + displayName: + description: Display name helps to differentiate between object storages, + especially if they are in the same region. + example: Object storage 1 maxLength: 255 minLength: 1 type: string - description: - description: The description of the snapshot. There is a limit of 255 characters - per snapshot. - example: Snapshot-Description - maxLength: 255 + required: + - displayName + type: object + CreateTicketRequest: + example: + note: Note + sender: your@mail.com + subject: Subject + properties: + subject: + description: The ticket subject + example: Subject + minLength: 1 + type: string + note: + description: The ticket note + example: Note + minLength: 1 + type: string + sender: + description: Customer email + example: your@mail.com minLength: 1 type: string required: - - name + - note + - sender + - subject type: object - CreateSnapshotResponse: + CreateTicketResponseData: example: - data: - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 - tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 - tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description - _links: - self: /v1/compute/instances/12345/snapshots/snap1628603855 + tenantId: DE + customerId: "54321" properties: - data: - items: - $ref: '#/components/schemas/SnapshotResponse' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/compute/instances/12345/snapshots/snap1628603855 + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your customer number + example: "54321" + minLength: 1 + type: string required: - - _links - - data + - customerId + - tenantId type: object - FindSnapshotResponse: + CreateTicketResponse: example: data: - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 - tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 - tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description + - tenantId: DE + customerId: "54321" + - tenantId: DE + customerId: "54321" _links: - self: /v1/compute/instances/12345/snapshots/snap1628603855 + self: /v1/create-ticket properties: data: items: - $ref: '#/components/schemas/SnapshotResponse' + $ref: '#/components/schemas/CreateTicketResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/compute/instances/12345/snapshots/snap1628603855 + self: /v1/create-ticket required: - _links - data type: object - UpdateSnapshotRequest: + ObjectStorageAuditResponse: example: - name: Snapshot-Server - description: Snapshot-Description + traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + objectStorageId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + changedBy: "54321" + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + tenantId: DE + customerId: "54321" + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe properties: - name: - description: The name of the snapshot. Tags may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - snapshot. - example: Snapshot-Server - maxLength: 255 + id: + description: The identifier of the audit entry. + example: 12345 + format: int64 + type: integer + action: + description: Type of the action. + enum: + - CREATED + - UPDATED + - DELETED + example: CREATED + type: string + timestamp: + description: When the change took place. + example: 2021-03-30T11:35:06.177Z + format: date-time + type: string + tenantId: + description: Customer tenant id + example: DE minLength: 1 type: string - description: - description: The description of the snapshot. There is a limit of 255 characters - per snapshot. - example: Snapshot-Description - maxLength: 255 + customerId: + description: Customer number + example: "54321" + minLength: 1 + type: string + changedBy: + description: User ID + example: "54321" minLength: 1 type: string + username: + description: Name of the user which led to the change. + example: John.Doe + type: string + requestId: + description: The requestId of the API call which led to the change. + example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + type: string + traceId: + description: The traceId of the API call which led to the change. + example: 78E9A428-94E9-4A2A-92F5-26038C6884F + type: string + objectStorageId: + description: Object Storage Id + example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + type: string + changes: + description: List of actual changes. + example: + prev: + name: test + new: + name: test1 + type: object + required: + - action + - changedBy + - customerId + - id + - objectStorageId + - requestId + - tenantId + - timestamp + - traceId + - username type: object - UpdateSnapshotResponse: + ListObjectStorageAuditResponse: example: data: - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + objectStorageId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + changedBy: "54321" + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description - - snapshotId: snap1628603855 - instanceId: 1234 - createdDate: 2021-06-02T12:32:03.363Z - autoDeleteDate: 2021-07-02T12:32:03.363Z - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - imageName: ubuntu-18.04 + customerId: "54321" + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + objectStorageId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + changedBy: "54321" + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE - customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 - name: Snapshot-Server - description: Snapshot-Description + customerId: "54321" + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe _links: - self: /v1/compute/instances/12345/snapshots/snap1628603855 + first: /v1/object-storages/audits?page=2 + previous: /v1/object-storages/audits?page=2 + next: /v1/object-storages/audits?page=3 + last: /v1/object-storages/audits?page=10 + self: /v1/object-storages/audits + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/SnapshotResponse' + $ref: '#/components/schemas/ObjectStorageAuditResponse' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/compute/instances/12345/snapshots/snap1628603855 + first: /v1/object-storages/audits?page=2 + previous: /v1/object-storages/audits?page=2 + next: /v1/object-storages/audits?page=3 + last: /v1/object-storages/audits?page=10 + self: /v1/object-storages/audits required: - _links + - _pagination - data type: object - RollbackSnapshotRequest: - properties: {} - type: object - RollbackSnapshotResponse: - example: - _links: - self: /v1/compute/instances/12345/snapshots/snap1628603855 - properties: - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - description: Links for easy navigation. - example: - self: /v1/compute/instances/12345/snapshots/snap1628603855 - required: - - _links - type: object - ApplicationConfig: - properties: - imageId: - description: Image ID - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string - userDataId: - description: User Data ID - example: 8b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string - userData: - description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize - during start of compute instance.' - example: |- - #cloud-config - user: admin - timezone: Europe/Berlin - chpasswd: - expire: False - type: string - required: - - imageId - - userData - - userDataId - type: object - MinimumRequirements: - properties: - cpuCores: - description: CPU Cores Requirement - example: 2 - type: number - ramMb: - description: Memory Requirement in MB - example: 100 - type: number - diskMb: - description: Storage Requirement in MB - example: 500 - type: number - type: object - OptimalRequirements: - properties: - cpuCores: - description: CPU Cores Requirement - example: 2 - type: number - ramMb: - description: Memory Requirement in MB - example: 100 - type: number - diskMb: - description: Storage Requirement in MB - example: 500 - type: number - type: object - ApplicationRequirements: - properties: - minimum: - allOf: - - $ref: '#/components/schemas/MinimumRequirements' - description: Application minimum requirements - optimal: - allOf: - - $ref: '#/components/schemas/OptimalRequirements' - description: Application optimal requirements - type: object - ApplicationResponse: + TagResponse: + example: + color: '#0A78C3' + tagId: 12345 + tenantId: DE + customerId: "54321" + name: Web-Server properties: - applicationId: - description: Application ID - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - type: string tenantId: - description: Tenant ID - enum: - - DE - - INT + description: Your customer tenant id example: DE minLength: 1 type: string customerId: - description: Customer ID - example: "12345" + description: Your customer number + example: "54321" minLength: 1 type: string + tagId: + description: Tag's id + example: 12345 + type: number name: - description: Application Name - example: Webmin - type: string - description: - description: Application Description - example: Webmin cloud init + description: Tag's name + example: Web-Server + maxLength: 255 + minLength: 1 type: string - type: - description: Application type - enum: - - standard - - crypto - example: standard + color: + description: Tag's color + example: '#0A78C3' + maxLength: 7 + minLength: 4 type: string - applicationConfig: - description: Application Config - items: - $ref: '#/components/schemas/ApplicationConfig' - type: array - requirements: - allOf: - - $ref: '#/components/schemas/ApplicationRequirements' - description: Application Requirements required: - - applicationConfig - - applicationId + - color - customerId - - description - name - - requirements + - tagId - tenantId - - type type: object - ListApplicationsResponse: + ListTagResponse: + example: + data: + - color: '#0A78C3' + tagId: 12345 + tenantId: DE + customerId: "54321" + name: Web-Server + - color: '#0A78C3' + tagId: 12345 + tenantId: DE + customerId: "54321" + name: Web-Server + _links: + first: /v1/tags?page=1 + previous: /v1/tags?page=19 + self: /v1/tags/12345 + next: /v1/tags?page=21 + last: /v1/tags?page=101 + _pagination: "" properties: _pagination: allOf: @@ -10015,212 +9931,236 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ApplicationResponse' + $ref: '#/components/schemas/TagResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/compute/applications?page=1 - previous: /v1/compute/applications?page=19 - self: /v1/compute/applications?page=20 - next: /v1/compute/applications?page=21 - last: /v1/compute/applications?page=101 + first: /v1/tags?page=1 + previous: /v1/tags?page=19 + self: /v1/tags/12345 + next: /v1/tags?page=21 + last: /v1/tags?page=101 required: - _links - _pagination - data type: object - VncResponse: + CreateTagRequest: + example: + color: '#0A78C3' + name: Web-Server + properties: + name: + description: The name of the tag. Tags may contain letters, numbers, colons, + dashes, and underscores. There is a limit of 255 characters per tag. + example: Web-Server + maxLength: 255 + minLength: 1 + type: string + color: + default: '#0A78C3' + description: 'The color of the tag. Color can be specified using hexadecimal + value. Default color is #0A78C3' + example: '#0A78C3' + maxLength: 7 + minLength: 4 + type: string + required: + - color + - name + type: object + CreateTagResponseData: + example: + tagId: 12345 + tenantId: DE + customerId: "54321" properties: tenantId: description: Your customer tenant id - enum: - - DE - - INT example: DE minLength: 1 type: string customerId: - description: Customer ID - example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + description: Your customer number + example: "54321" minLength: 1 type: string - instanceId: - description: Instance ID - example: 100 - format: int64 - type: integer - enabled: - description: VNC Status for the instance. - example: true - type: boolean - vncIp: - description: VNC IP for the instance. - example: 154.12.54.123 - type: string - vncPort: - description: VNC Port for the instance. - example: 8001 + tagId: + description: Tag's id + example: 12345 type: number required: - customerId - - enabled - - instanceId + - tagId - tenantId - - vncIp - - vncPort type: object - FindVncResponse: + CreateTagResponse: + example: + data: + - tagId: 12345 + tenantId: DE + customerId: "54321" + - tagId: 12345 + tenantId: DE + customerId: "54321" + _links: + self: /v1/tags/12345 properties: data: items: - $ref: '#/components/schemas/VncResponse' + $ref: '#/components/schemas/CreateTagResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/compute/instances/100/vnc + self: /v1/tags/12345 required: - _links - data type: object - PatchVncRequest: + FindTagResponse: + example: + data: + - color: '#0A78C3' + tagId: 12345 + tenantId: DE + customerId: "54321" + name: Web-Server + - color: '#0A78C3' + tagId: 12345 + tenantId: DE + customerId: "54321" + name: Web-Server + _links: + self: /v1/tags/12345 properties: - vncPassword: - description: Password for instance VNC - example: test123 + data: + items: + $ref: '#/components/schemas/TagResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/tags/12345 + required: + - _links + - data + type: object + UpdateTagRequest: + example: + color: '#0A78C3' + name: Updated-Web-Server + properties: + name: + description: The name of the tag. Tags may contain letters, numbers, colons, + dashes, and underscores. There is a limit of 255 characters per tag. + example: Updated-Web-Server + maxLength: 255 + minLength: 1 + type: string + color: + description: 'The color of the tag. Color can be specified using hexadecimal + value. Default color is #0A78C3' + example: '#0A78C3' + maxLength: 7 + minLength: 4 type: string + type: object + UpdateTagResponse: + example: + _links: + self: /v1/tags/12345 + properties: + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + description: Links for easy navigation. + example: + self: /v1/tags/12345 required: - - vncPassword + - _links type: object - ImageAuditResponseData: + AssignmentResponse: example: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - imageId: e443eab5-647a-4bc3-b4f9-16f5a281224d - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + tagId: 12345 tenantId: DE customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe + resourceName: Instance + tagName: Web-Server + resourceType: instance properties: - id: - description: The ID of the audit entry. - example: 12345 - format: int64 - type: integer - action: - description: Type of the action. - enum: - - CREATED - - UPDATED - - DELETED - example: CREATED - type: string - timestamp: - description: When the change took place. - example: 2021-03-30T11:35:06.177Z - format: date-time - type: string tenantId: - description: Customer tenant id + description: Your customer tenant id example: DE minLength: 1 type: string customerId: - description: Customer ID + description: Your customer number example: "54321" minLength: 1 type: string - changedBy: - description: Id of user who performed the change - example: c4c800ff-e524-47dd-9543-71dfc8b91113 + tagId: + description: Tag's id + example: 12345 + type: number + tagName: + description: Tag's name + example: Web-Server + maxLength: 255 minLength: 1 type: string - username: - description: Name of the user which led to the change. - example: John.Doe - type: string - requestId: - description: The requestId of the API call which led to the change. - example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + resourceType: + description: Resource type. Resource type is one of `instance|image|object-storage`. + example: instance + minLength: 1 type: string - traceId: - description: The traceId of the API call which led to the change. - example: 78E9A428-94E9-4A2A-92F5-26038C6884F + resourceId: + description: Resource id + example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + minLength: 1 type: string - imageId: - description: The identifier of the image - example: e443eab5-647a-4bc3-b4f9-16f5a281224d + resourceName: + description: Resource name + example: Instance + minLength: 1 type: string - changes: - description: List of actual changes. - example: - prev: - name: test - new: - name: test1 - type: object required: - - action - - changedBy - customerId - - id - - imageId - - requestId + - resourceId + - resourceName + - resourceType + - tagId + - tagName - tenantId - - timestamp - - traceId - - username type: object - ImageAuditResponse: + ListAssignmentResponse: example: data: - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - imageId: e443eab5-647a-4bc3-b4f9-16f5a281224d - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + tagId: 12345 tenantId: DE customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - imageId: e443eab5-647a-4bc3-b4f9-16f5a281224d - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + resourceName: Instance + tagName: Web-Server + resourceType: instance + - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + tagId: 12345 tenantId: DE customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe + resourceName: Instance + tagName: Web-Server + resourceType: instance _links: - first: /v1/compute/images/audits?page=2 - previous: /v1/compute/images/audits?page=2 - next: /v1/compute/images/audits?page=3 - last: /v1/compute/images/audits?page=10 - self: /v1/compute/images/audits + first: /v1/tags/12345/assignments?page=1 + previous: /v1/tags/12345/assignments?page=19 + self: /v1/tags/12345/assignments/instance/23456 + next: /v1/tags/12345/assignments?page=21 + last: /v1/tags/12345/assignments?page=101 _pagination: "" properties: _pagination: @@ -10229,28 +10169,98 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ImageAuditResponseData' + $ref: '#/components/schemas/AssignmentResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/compute/images/audits?page=2 - previous: /v1/compute/images/audits?page=2 - next: /v1/compute/images/audits?page=3 - last: /v1/compute/images/audits?page=10 - self: /v1/compute/images/audits + first: /v1/tags/12345/assignments?page=1 + previous: /v1/tags/12345/assignments?page=19 + self: /v1/tags/12345/assignments/instance/23456 + next: /v1/tags/12345/assignments?page=21 + last: /v1/tags/12345/assignments?page=101 required: - _links - _pagination - data type: object - SnapshotsAuditResponse: + TagAssignmentSelfLinks: + properties: + self: + description: Link to current resource. + type: string + tag: + description: Link to related tag. + type: string + _resource: + description: Link to assigned resource + type: string + required: + - _resource + - self + - tag + type: object + FindAssignmentResponse: + example: + data: + - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + tagId: 12345 + tenantId: DE + customerId: "54321" + resourceName: Instance + tagName: Web-Server + resourceType: instance + - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc + tagId: 12345 + tenantId: DE + customerId: "54321" + resourceName: Instance + tagName: Web-Server + resourceType: instance + _links: + self: /v1/tags/12345/assignments/instance/23456 + tag: /v1/tags/12345 + instance: /v1/compute/instances/23456 + properties: + data: + items: + $ref: '#/components/schemas/AssignmentResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/TagAssignmentSelfLinks' + example: + self: /v1/tags/12345/assignments/instance/23456 + tag: /v1/tags/12345 + instance: /v1/compute/instances/23456 + required: + - _links + - data + type: object + CreateAssignmentResponse: + example: + _links: + self: /v1/tags/12345/assignments/instance/6549 + tag: /v1/tags/12345 + instance: /v1/compute/instance/6549 + properties: + _links: + allOf: + - $ref: '#/components/schemas/TagAssignmentSelfLinks' + description: Links for easy navigation. + example: + self: /v1/tags/12345/assignments/instance/6549 + tag: /v1/tags/12345 + instance: /v1/compute/instance/6549 + required: + - _links + type: object + TagAuditResponse: example: traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - snapshotId: snap1628603855 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + tagId: 12345 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -10262,44 +10272,48 @@ components: action: CREATED id: 12345 timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe + username: John Doe properties: - id: - description: The ID of the audit entry. - example: 12345 - format: int64 - type: integer - action: - description: Type of the action. - enum: - - CREATED - - UPDATED - - DELETED - example: CREATED - type: string - timestamp: - description: When the change took place. - example: 2021-03-30T11:35:06.177Z - format: date-time - type: string tenantId: - description: Customer tenant id + description: Your customer tenant id example: DE minLength: 1 type: string customerId: - description: Customer ID + description: Your customer number example: "54321" minLength: 1 type: string + id: + description: The identifier of the audit entry. + example: 12345 + type: number + tagId: + description: The identifier of the audit entry. + example: 12345 + minimum: 0 + type: number + action: + description: Type of the action. + enum: + - CREATED + - DELETED + - UPDATED + example: CREATED + type: string + timestamp: + description: When the change took place. + example: 2021-03-30T11:35:06.177Z + format: date-time + type: string changedBy: - description: Id of user who performed the change - example: c4c800ff-e524-47dd-9543-71dfc8b91113 + description: User ID + example: "54321" minLength: 1 type: string username: description: Name of the user which led to the change. - example: John.Doe + example: John Doe type: string requestId: description: The requestId of the API call which led to the change. @@ -10309,18 +10323,8 @@ components: description: The traceId of the API call which led to the change. example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - instanceId: - description: The identifier of the instance - example: 12345 - format: int64 - minimum: 0 - type: integer - snapshotId: - description: The identifier of the snapshot - example: snap1628603855 - type: string changes: - description: List of actual changes + description: List of actual changes. example: prev: name: test @@ -10332,21 +10336,19 @@ components: - changedBy - customerId - id - - instanceId - requestId - - snapshotId + - tagId - tenantId - timestamp - traceId - username type: object - ListSnapshotsAuditResponse: + ListTagAuditsResponse: example: data: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - snapshotId: snap1628603855 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + tagId: 12345 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -10358,11 +10360,10 @@ components: action: CREATED id: 12345 timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe + username: John Doe - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - instanceId: 12345 - snapshotId: snap1628603855 - changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + tagId: 12345 + changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -10374,202 +10375,13 @@ components: action: CREATED id: 12345 timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe - _links: - first: /v1/compute/snapshots/audits?page=2 - previous: /v1/compute/snapshots/audits?page=2 - next: /v1/compute/snapshots/audits?page=3 - last: /v1/compute/snapshots/audits?page=10 - self: /v1/compute/snapshots/audits - _pagination: "" - properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. - data: - items: - $ref: '#/components/schemas/SnapshotsAuditResponse' - type: array - _links: - allOf: - - $ref: '#/components/schemas/Links' - example: - first: /v1/compute/snapshots/audits?page=2 - previous: /v1/compute/snapshots/audits?page=2 - next: /v1/compute/snapshots/audits?page=3 - last: /v1/compute/snapshots/audits?page=10 - self: /v1/compute/snapshots/audits - required: - - _links - - _pagination - - data - type: object - AutoScalingTypeResponse: - properties: - state: - description: State of the autoscaling for the current object storage. - enum: - - enabled - - disabled - - error - example: enabled - type: string - sizeLimitTB: - description: Autoscaling size limit for the current object storage. - example: 1 - format: double - type: number - errorMessage: - description: Error message - type: string - required: - - sizeLimitTB - - state - type: object - ObjectStorageResponse: - example: - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z - tenantId: DE - customerId: "54321" - region: European Union (Germany) - status: READY - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - objectStorageId: - description: Your object storage id - example: b943b25a-c8b5-4570-9135-4bbaa7615b81 - minLength: 1 - type: string - createdDate: - description: Creation date for object storage. - example: 2021-06-02T12:32:03.363Z - format: date-time - type: string - cancelDate: - description: Cancellation date for object storage. - example: 2021-06-02 - format: date - type: string - autoScaling: - allOf: - - $ref: '#/components/schemas/AutoScalingTypeResponse' - description: Autoscaling settings - dataCenter: - description: Data center your object storage is located - example: EU - minLength: 1 - type: string - totalPurchasedSpaceTB: - description: Amount of purchased / requested object storage in TB. - example: 6.25 - format: double - type: number - s3Url: - description: S3 URL to connect to your S3 compatible object storage - example: eu1-s3.contabo.com - type: string - s3TenantId: - description: Your S3 tenantId. Only required for public sharing. - example: 2cd2e5e1444a41b0bed16c6410ecaa84 - type: string - status: - description: The object storage status - enum: - - READY - - PROVISIONING - - UPGRADING - - CANCELLED - - ERROR - - ENABLED - - DISABLED - - MANUAL_PROVISIONING - - PRODUCT_NOT_AVAILABLE - - LIMIT_EXCEEDED - - VERIFICATION_REQUIRED - - COMPLETED - - ORDER_PROCESSING - - PENDING_PAYMENT - - UNKNOWN - example: READY - type: string - region: - description: The region where your object storage is located - example: European Union (Germany) - type: string - displayName: - description: Display name for object storage. - example: Object storage 1 - maxLength: 255 - minLength: 1 - type: string - required: - - autoScaling - - cancelDate - - createdDate - - customerId - - dataCenter - - displayName - - objectStorageId - - region - - s3TenantId - - s3Url - - status - - tenantId - - totalPurchasedSpaceTB - type: object - ListObjectStorageResponse: - example: - data: - - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z - tenantId: DE - customerId: "54321" - region: European Union (Germany) - status: READY - - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z - tenantId: DE - customerId: "54321" - region: European Union (Germany) - status: READY + username: John Doe _links: - first: /v1/object-storages?size=10 - previous: /v1/object-storages?page=1&size=10 - next: /v1/object-storages?page=3&size=10 - last: /v1/object-storages?page=5&size=10 - self: /v1/object-storages + first: /v1/tags/audits?page=1 + previous: /v1/tags/audits?page=19 + self: /v1/tags/audits?page=20 + next: /v1/tags/audits?page=21 + last: /v1/tags/audits?page=101 _pagination: "" properties: _pagination: @@ -10578,121 +10390,145 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ObjectStorageResponse' + $ref: '#/components/schemas/TagAuditResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/object-storages?size=10 - previous: /v1/object-storages?page=1&size=10 - next: /v1/object-storages?page=3&size=10 - last: /v1/object-storages?page=5&size=10 - self: /v1/object-storages + first: /v1/tags/audits?page=1 + previous: /v1/tags/audits?page=19 + self: /v1/tags/audits?page=20 + next: /v1/tags/audits?page=21 + last: /v1/tags/audits?page=101 required: - _links - _pagination - data type: object - DataCenterResponse: + AssignmentAuditResponse: example: - s3Url: eu1-s3.contabo.com - capabilities: - - VPS - - Object-Storage - regionSlug: EU - regionName: European Union (Germany) - name: European Union (Germany) 1 + traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F5 + resourceId: a1b2c3 + tagId: 12345 + changes: '{}' + changedBy: "54321" + requestId: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 tenantId: DE customerId: "54321" - slug: EU1 + action: CREATED | DELETED + id: 12345 + resourceType: instance + timestamp: 2000-01-23T04:56:07.000+00:00 + username: John Doe properties: - name: - description: Name of the data center - example: European Union (Germany) 1 + tenantId: + description: Your customer tenant id + example: DE minLength: 1 type: string - slug: - description: Slug of the data center - example: EU1 + customerId: + description: Your customer number + example: "54321" minLength: 1 type: string - capabilities: - example: - - VPS - - Object-Storage - items: - enum: - - VPS - - VDS - - Object-Storage - - Private-Networking - type: string - type: array - s3Url: - description: S3 URL of the data center - example: eu1-s3.contabo.com - minLength: 1 + id: + description: The identifier of the audit entry. + example: 12345 + type: number + resourceId: + description: Resource's id + example: a1b2c3 type: string - regionName: - description: Name of the region - example: European Union (Germany) - minLength: 1 + resourceType: + description: Resource type. Resource type is one of `instance|image|object-storage`. + example: instance type: string - regionSlug: - description: Slug of the region - example: EU - minLength: 1 + tagId: + description: Tag's id + example: 12345 + minimum: 0 + type: number + action: + description: Audit Action + enum: + - CREATED + - DELETED + example: CREATED | DELETED type: string - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 + timestamp: + description: Audit creation date + format: date-time type: string - customerId: - description: Your customer number + changedBy: + description: User ID example: "54321" minLength: 1 type: string + username: + description: User Full Name + example: John Doe + type: string + requestId: + description: Request ID + example: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 + type: string + traceId: + description: Trace ID + example: 78E9A428-94E9-4A2A-92F5-26038C6884F5 + type: string + changes: + description: Changes made for a specific Tag + type: object required: - - capabilities + - action + - changedBy - customerId - - name - - regionName - - regionSlug - - s3Url - - slug + - id + - requestId + - resourceId + - resourceType + - tagId - tenantId + - timestamp + - traceId + - username type: object - ListDataCenterResponse: + ListAssignmentAuditsResponse: example: data: - - s3Url: eu1-s3.contabo.com - capabilities: - - VPS - - Object-Storage - regionSlug: EU - regionName: European Union (Germany) - name: European Union (Germany) 1 + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F5 + resourceId: a1b2c3 + tagId: 12345 + changes: '{}' + changedBy: "54321" + requestId: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 tenantId: DE customerId: "54321" - slug: EU1 - - s3Url: eu1-s3.contabo.com - capabilities: - - VPS - - Object-Storage - regionSlug: EU - regionName: European Union (Germany) - name: European Union (Germany) 1 + action: CREATED | DELETED + id: 12345 + resourceType: instance + timestamp: 2000-01-23T04:56:07.000+00:00 + username: John Doe + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F5 + resourceId: a1b2c3 + tagId: 12345 + changes: '{}' + changedBy: "54321" + requestId: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 tenantId: DE customerId: "54321" - slug: EU1 + action: CREATED | DELETED + id: 12345 + resourceType: instance + timestamp: 2000-01-23T04:56:07.000+00:00 + username: John Doe _links: - first: /v1/data-centers?page=1 - previous: /v1/data-centers?page=19 - self: /v1/data-centers/12345 - next: /v1/data-centers?page=21 - last: /v1/data-centers?page=101 + first: /v1/tags/assignments/audits?page=1 + previous: /v1/tags/assignments/audits?page=19 + self: /v1/tags/assignments/audits?page=20 + next: /v1/tags/assignments/audits?page=21 + last: /v1/tags/assignments/audits?page=101 _pagination: "" properties: _pagination: @@ -10701,92 +10537,235 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/DataCenterResponse' + $ref: '#/components/schemas/AssignmentAuditResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/data-centers?page=1 - previous: /v1/data-centers?page=19 - self: /v1/data-centers/12345 - next: /v1/data-centers?page=21 - last: /v1/data-centers?page=101 + first: /v1/tags/assignments/audits?page=1 + previous: /v1/tags/assignments/audits?page=19 + self: /v1/tags/assignments/audits?page=20 + next: /v1/tags/assignments/audits?page=21 + last: /v1/tags/assignments/audits?page=101 required: - _links - _pagination - data type: object - AutoScalingTypeRequest: + IpV4: + example: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + properties: + ip: + description: IP Address + example: 192.168.0.1 + type: string + netmaskCidr: + description: Netmask CIDR + example: 19 + format: int32 + type: integer + gateway: + description: Gateway + example: 1.1.1.1 + type: string + required: + - gateway + - ip + - netmaskCidr + type: object + PrivateIpConfig: + example: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + properties: + v4: + items: + $ref: '#/components/schemas/IpV4' + type: array + required: + - v4 + type: object + IpV6: + example: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + properties: + ip: + description: IP Address + example: 1:2:3:4:5:6:7:8 + type: string + netmaskCidr: + description: Netmask CIDR + example: 64 + format: int32 + type: integer + gateway: + description: Gateway + example: 1:2:3:4:5:6:7:8 + type: string + required: + - gateway + - ip + - netmaskCidr + type: object + IpConfig: + example: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 properties: - state: - description: State of the autoscaling for the current object storage. - enum: - - enabled - - disabled - example: enabled - type: string - sizeLimitTB: - description: Autoscaling size limit for the current object storage. - example: 1 - format: double - type: number + v4: + $ref: '#/components/schemas/IpV4' + v6: + $ref: '#/components/schemas/IpV6' required: - - sizeLimitTB - - state + - v4 + - v6 type: object - CreateObjectStorageRequest: + Instances: example: - autoScaling: "" - displayName: Object storage 1 - region: EU - totalPurchasedSpaceTB: 6 + ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok properties: - region: - default: EU - description: 'Region where the object storage should be located. Default - is EU. Available regions: EU, US-central, SIN' - example: EU - minLength: 1 - type: string - autoScaling: - allOf: - - $ref: '#/components/schemas/AutoScalingTypeRequest' - description: Autoscaling settings - totalPurchasedSpaceTB: - description: Amount of purchased / requested object storage in TB. - example: 6 - format: double - type: number + instanceId: + description: Instance id + example: 100 + format: int64 + type: integer displayName: - description: Display name helps to differentiate between object storages, - especially if they are in the same region. If display name is not provided, - it will be generated. Display name can be changed any time. - example: Object storage 1 - maxLength: 255 - minLength: 1 + description: Instance display name + example: Instance + type: string + name: + description: Instance name + example: vmd12345 + type: string + productId: + description: Product id + example: V1 + type: string + privateIpConfig: + $ref: '#/components/schemas/PrivateIpConfig' + ipConfig: + $ref: '#/components/schemas/IpConfig' + status: + description: State of the instance in the Private Network + enum: + - ok + - restart + - reinstall + - reinstallation failed + - installing + example: ok + type: string + errorMessage: + description: Message in case of an error. type: string required: - - region - - totalPurchasedSpaceTB + - displayName + - instanceId + - ipConfig + - name + - privateIpConfig + - productId + - status type: object - CreateObjectStorageResponseData: + ListPrivateNetworkResponseData: example: - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - usedSpacePercentage: 100 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z - usedSpaceTB: 4 + createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - region: European Union (Germany) - status: READY + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU properties: tenantId: description: Your customer tenant id @@ -10794,246 +10773,306 @@ components: minLength: 1 type: string customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - objectStorageId: - description: Your object storage id - example: b943b25a-c8b5-4570-9135-4bbaa7615b81 - minLength: 1 - type: string - createdDate: - description: Creation date for object storage. - example: 2021-06-02T12:32:03.363Z - format: date-time - type: string - cancelDate: - description: Cancellation date for object storage. - example: 2021-06-02 - format: date - type: string - autoScaling: - allOf: - - $ref: '#/components/schemas/AutoScalingTypeResponse' - description: Autoscaling settings - dataCenter: - description: The data center of the storage - example: EU - minLength: 1 - type: string - totalPurchasedSpaceTB: - description: Amount of purchased / requested object storage in TB. - example: 6.25 - format: double - type: number - usedSpaceTB: - description: Currently used space in TB. - example: 4 - format: double - type: number - usedSpacePercentage: - description: Currently used space in percentage. - example: 100 - format: double - maximum: 100 - minimum: 0 - type: number - s3Url: - description: S3 URL to connect to your S3 compatible object storage - example: eu1-s3.contabo.com - type: string - s3TenantId: - description: Your S3 tenantId. Only required for public sharing. - example: 2cd2e5e1444a41b0bed16c6410ecaa84 - type: string - status: - description: The object storage status - enum: - - READY - - PROVISIONING - - UPGRADING - - CANCELLED - - ERROR - - ENABLED - - DISABLED - - MANUAL_PROVISIONING - - PRODUCT_NOT_AVAILABLE - - LIMIT_EXCEEDED - - VERIFICATION_REQUIRED - - COMPLETED - - ORDER_PROCESSING - - PENDING_PAYMENT - - UNKNOWN - example: READY + description: Your customer number + example: "54321" minLength: 1 type: string + privateNetworkId: + description: Private Network's id + example: 12345 + format: int64 + type: integer + dataCenter: + description: The data center where your Private Network is located + example: European Union (Germany) 1 + type: string region: - description: The region where your object storage is located + description: The slug of the region where your Private Network is located + example: EU + type: string + regionName: + description: The region where your Private Network is located example: European Union (Germany) type: string - displayName: - description: Display name for object storage. - example: Object storage 1 - maxLength: 255 - minLength: 1 + name: + description: The name of the Private Network + example: myPrivateNetwork + type: string + description: + description: The description of the Private Network + example: myPrivateNetwork Description + type: string + cidr: + description: The cidr range of the Private Network + example: 10.0.0.0/22 + type: string + availableIps: + description: The total available IPs of the Private Network + example: 1022 + format: int64 + type: integer + createdDate: + description: The creation date of the Private Network + example: 2021-06-03T06:27:12Z + format: date-time type: string + instances: + items: + $ref: '#/components/schemas/Instances' + type: array required: - - autoScaling - - cancelDate + - availableIps + - cidr - createdDate - customerId - dataCenter - - displayName - - objectStorageId + - description + - instances + - name + - privateNetworkId - region - - s3TenantId - - s3Url - - status + - regionName - tenantId - - totalPurchasedSpaceTB - - usedSpacePercentage - - usedSpaceTB type: object - CreateObjectStorageResponse: - example: - data: - - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - usedSpacePercentage: 100 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z - usedSpaceTB: 4 - tenantId: DE - customerId: "54321" - region: European Union (Germany) - status: READY - - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - usedSpacePercentage: 100 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z - usedSpaceTB: 4 - tenantId: DE - customerId: "54321" - region: European Union (Germany) - status: READY - _links: - self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 - properties: - data: - items: - $ref: '#/components/schemas/CreateObjectStorageResponseData' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 - required: - - _links - - data - type: object - FindObjectStorageResponse: + ListPrivateNetworkResponse: example: data: - - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - region: European Union (Germany) - status: READY - - objectStorageId: b943b25a-c8b5-4570-9135-4bbaa7615b81 - cancelDate: 2021-06-02T00:00:00.000+0000 - s3Url: eu1-s3.contabo.com - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 - totalPurchasedSpaceTB: 6.25 - s3TenantId: 2cd2e5e1444a41b0bed16c6410ecaa84 - createdDate: 2021-06-02T12:32:03.363Z + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - region: European Union (Germany) - status: READY + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU _links: - self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 + first: /v1/private-networks?page=1 + previous: /v1/private-networks?page=19 + self: /v1/private-networks?page=20 + next: /v1/private-networks?page=21 + last: /v1/private-networks?page=101 + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ObjectStorageResponse' + $ref: '#/components/schemas/ListPrivateNetworkResponseData' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 + first: /v1/private-networks?page=1 + previous: /v1/private-networks?page=19 + self: /v1/private-networks?page=20 + next: /v1/private-networks?page=21 + last: /v1/private-networks?page=101 required: - _links + - _pagination - data type: object - UpgradeAutoScalingType: - properties: - state: - description: State of the autoscaling for the current object storage. - enum: - - enabled - - disabled - example: enabled - type: string - sizeLimitTB: - description: Autoscaling size limit for the current object storage. - example: 6 - format: double - type: number - type: object - UpgradeObjectStorageRequest: + CreatePrivateNetworkRequest: example: - autoScaling: "" - totalPurchasedSpaceTB: 8 + name: myPrivateNetwork + description: myPrivateNetwork Description + region: EU properties: - autoScaling: - allOf: - - $ref: '#/components/schemas/UpgradeAutoScalingType' - description: New monthly object storage size limit for autoscaling if enabled. - totalPurchasedSpaceTB: - description: New total object storage limit. If this number is larger than - before you will also be billed for the added storage space. No downgrade - possible. - example: 8 - format: double - type: number + region: + default: EU + description: Region where the Private Network should be located. Default + is `EU` + example: EU + minLength: 1 + type: string + name: + description: The name of the Private Network. It may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + Private Network name. + example: myPrivateNetwork + maxLength: 255 + minLength: 1 + type: string + description: + description: The description of the Private Network. There is a limit of + 255 characters per Private Network description. + example: myPrivateNetwork Description + maxLength: 255 + type: string + required: + - name type: object - UpgradeObjectStorageResponseData: + PrivateNetworkResponse: example: - objectStorageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - s3Url: eu1-s3.contabo.com - createdDate: 2021-06-02T12:32:03.363Z - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 + createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - region: European Union (Germany) - totalPurchasedSpaceTB: 6 - status: READY + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU properties: tenantId: description: Your customer tenant id @@ -11045,341 +11084,544 @@ components: example: "54321" minLength: 1 type: string - objectStorageId: - description: Object storage id - example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - minLength: 1 - type: string - createdDate: - description: Creation date for object storage. - example: 2021-06-02T12:32:03.363Z - type: string + privateNetworkId: + description: Private Network's id + example: 12345 + format: int64 + type: integer dataCenter: - description: Data center of the object storage. + description: The data center where your Private Network is located + example: European Union (Germany) 1 + type: string + region: + description: The slug of the region where your Private Network is located example: EU type: string - autoScaling: - allOf: - - $ref: '#/components/schemas/AutoScalingTypeResponse' - description: The autoscaling limit of the object storage. - s3Url: - description: S3 URL to connect to your S3 compatible object storage - example: eu1-s3.contabo.com + regionName: + description: The region where your Private Network is located + example: European Union (Germany) type: string - status: - description: The object storage status - enum: - - READY - - PROVISIONING - - UPGRADING - - CANCELLED - - ERROR - - ENABLED - - DISABLED - - MANUAL_PROVISIONING - - PRODUCT_NOT_AVAILABLE - - LIMIT_EXCEEDED - - VERIFICATION_REQUIRED - - COMPLETED - - ORDER_PROCESSING - - PENDING_PAYMENT - - UNKNOWN - example: READY + name: + description: The name of the Private Network + example: myPrivateNetwork type: string - totalPurchasedSpaceTB: - description: Total purchased object storage space in TB. - example: 6 - format: double - type: number - region: - description: The region where your object storage is located - example: European Union (Germany) + description: + description: The description of the Private Network + example: myPrivateNetwork Description type: string - displayName: - description: Display name for object storage. - example: Object storage 1 - maxLength: 255 - minLength: 1 + cidr: + description: The cidr range of the Private Network + example: 10.0.0.0/22 + type: string + availableIps: + description: The total available IPs of the Private Network + example: 1022 + format: int64 + type: integer + createdDate: + description: The creation date of the Private Network + example: 2021-06-03T06:27:12Z + format: date-time type: string + instances: + items: + $ref: '#/components/schemas/Instances' + type: array required: - - autoScaling + - availableIps + - cidr - createdDate - customerId - dataCenter - - displayName - - objectStorageId + - description + - instances + - name + - privateNetworkId - region - - s3Url - - status + - regionName - tenantId - - totalPurchasedSpaceTB type: object - UpgradeObjectStorageResponse: + CreatePrivateNetworkResponse: example: data: - - objectStorageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - s3Url: eu1-s3.contabo.com - createdDate: 2021-06-02T12:32:03.363Z - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - region: European Union (Germany) - totalPurchasedSpaceTB: 6 - status: READY - - objectStorageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - s3Url: eu1-s3.contabo.com - createdDate: 2021-06-02T12:32:03.363Z - autoScaling: "" - dataCenter: EU - displayName: Object storage 1 + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - region: European Union (Germany) - totalPurchasedSpaceTB: 6 - status: READY + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU _links: - self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + self: /v1/private-networks/12345 properties: + data: + items: + $ref: '#/components/schemas/PrivateNetworkResponse' + type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - data: - items: - $ref: '#/components/schemas/UpgradeObjectStorageResponseData' - type: array + self: /v1/private-networks/12345 required: - _links - data type: object - ObjectStoragesStatsResponseData: + PatchPrivateNetworkRequest: example: - usedSpaceTB: 4 - numberOfObjects: 2 - usedSpacePercentage: 100 - tenantId: DE - customerId: "54321" + name: myPrivateNetwork + description: myPrivateNetwork Description properties: - tenantId: - description: Your customer tenant id - example: DE + name: + description: The name of the Private Network. It may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + Private Network. + example: myPrivateNetwork + maxLength: 255 minLength: 1 type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 + description: + description: The description of the Private Network. There is a limit of + 255 characters per Private Network. + example: myPrivateNetwork Description + maxLength: 255 type: string - usedSpaceTB: - description: Currently used space in TB. - example: 4 - format: double - type: number - usedSpacePercentage: - description: Currently used space in percentage. - example: 100 - format: double - maximum: 100 - minimum: 0 - type: number - numberOfObjects: - description: Number of all objects (i.e. files and folders) in object storage. - example: 2 - format: int64 - type: integer - required: - - customerId - - numberOfObjects - - tenantId - - usedSpacePercentage - - usedSpaceTB type: object - ObjectStoragesStatsResponse: + PatchPrivateNetworkResponse: example: data: - - usedSpaceTB: 4 - numberOfObjects: 2 - usedSpacePercentage: 100 + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - - usedSpaceTB: 4 - numberOfObjects: 2 - usedSpacePercentage: 100 + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU _links: - self: /v1/object-storages/stats/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 + self: /v1/private-networks/12345 properties: data: items: - $ref: '#/components/schemas/ObjectStoragesStatsResponseData' + $ref: '#/components/schemas/PrivateNetworkResponse' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/object-storages/stats/8cd3f2ba-65a7-4279-bb54-0fea88dc8860 + self: /v1/private-networks/12345 required: - _links - data type: object - CancelObjectStorageResponseData: - example: - objectStorageId: objectStorageId - cancelDate: 2021-06-02T00:00:00.000+0000 - displayName: Object storage 1 - tenantId: DE - customerId: "54321" - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - objectStorageId: - description: Object Storage id - type: string - cancelDate: - description: Cancellation date for object storage. - example: 2021-06-02 - format: date - type: string - displayName: - description: Display name for object storage. - example: Object storage 1 - maxLength: 255 - minLength: 1 - type: string - required: - - cancelDate - - customerId - - displayName - - objectStorageId - - tenantId - type: object - CancelObjectStorageResponse: + FindPrivateNetworkResponse: example: data: - - objectStorageId: objectStorageId - cancelDate: 2021-06-02T00:00:00.000+0000 - displayName: Object storage 1 + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" - - objectStorageId: objectStorageId - cancelDate: 2021-06-02T00:00:00.000+0000 - displayName: Object storage 1 + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU + - createdDate: 2021-06-03T06:27:12Z + privateNetworkId: 12345 + dataCenter: European Union (Germany) 1 + availableIps: 1022 + instances: + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + - ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + instanceId: 100 + productId: V1 + displayName: Instance + name: vmd12345 + errorMessage: errorMessage + privateIpConfig: + v4: + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + status: ok + regionName: European Union (Germany) tenantId: DE customerId: "54321" + name: myPrivateNetwork + description: myPrivateNetwork Description + cidr: 10.0.0.0/22 + region: EU _links: - self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + self: /v1/private-networks/12345 properties: + data: + items: + $ref: '#/components/schemas/PrivateNetworkResponse' + type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d - data: - items: - $ref: '#/components/schemas/CancelObjectStorageResponseData' - type: array + self: /v1/private-networks/12345 required: - _links - data type: object - PatchObjectStorageRequest: - example: - displayName: Object storage 1 - properties: - displayName: - description: Display name helps to differentiate between object storages, - especially if they are in the same region. - example: Object storage 1 - maxLength: 255 - minLength: 1 - type: string - required: - - displayName - type: object - CreateTicketRequest: - example: - note: Note - sender: your@mail.com - subject: Subject + InstanceAssignmentSelfLinks: properties: - subject: - description: The ticket subject - example: Subject - minLength: 1 + self: + description: Link to current resource. type: string - note: - description: The ticket note - example: Note - minLength: 1 + virtualPrivateCloud: + description: Link to related Private Network. type: string - sender: - description: Customer email - example: your@mail.com - minLength: 1 + instance: + description: Link to assigned instance. type: string required: - - note - - sender - - subject + - instance + - self + - virtualPrivateCloud type: object - CreateTicketResponseData: + AssignInstancePrivateNetworkResponse: example: - tenantId: DE - customerId: "54321" + _links: + self: /v1/private-networks/12345/instances/100 + virtualPrivateCloud: /v1/private-networks/12345 + instance: /v1/compute/instances/100 properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string + _links: + allOf: + - $ref: '#/components/schemas/InstanceAssignmentSelfLinks' + description: Links for easy navigation. + example: + self: /v1/private-networks/12345/instances/100 + virtualPrivateCloud: /v1/private-networks/12345 + instance: /v1/compute/instances/100 required: - - customerId - - tenantId + - _links type: object - CreateTicketResponse: + UnassignInstancePrivateNetworkResponse: example: - data: - - tenantId: DE - customerId: "54321" - - tenantId: DE - customerId: "54321" _links: - self: /v1/create-ticket + self: /v1/private-networks/12345/instances/100 + virtualPrivateCloud: /v1/private-networks/12345 + instance: /v1/compute/instances/100 properties: - data: - items: - $ref: '#/components/schemas/CreateTicketResponseData' - type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/InstanceAssignmentSelfLinks' + description: Links for easy navigation. example: - self: /v1/create-ticket + self: /v1/private-networks/12345/instances/100 + virtualPrivateCloud: /v1/private-networks/12345 + instance: /v1/compute/instances/100 required: - _links - - data type: object - ObjectStorageAuditResponse: + PrivateNetworkAuditResponse: example: traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - objectStorageId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + privateNetworkId: 12345 changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE @@ -11392,19 +11634,24 @@ components: action: CREATED id: 12345 timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe + username: John Doe properties: id: description: The identifier of the audit entry. example: 12345 format: int64 type: integer + privateNetworkId: + description: The identifier of the Private Network + example: 12345 + minimum: 0 + type: number action: description: Type of the action. enum: - CREATED - - UPDATED - DELETED + - UPDATED example: CREATED type: string timestamp: @@ -11423,13 +11670,13 @@ components: minLength: 1 type: string changedBy: - description: User ID + description: User id example: "54321" minLength: 1 type: string username: - description: Name of the user which led to the change. - example: John.Doe + description: User name which did the change. + example: John Doe type: string requestId: description: The requestId of the API call which led to the change. @@ -11439,10 +11686,6 @@ components: description: The traceId of the API call which led to the change. example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - objectStorageId: - description: Object Storage Id - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - type: string changes: description: List of actual changes. example: @@ -11456,18 +11699,18 @@ components: - changedBy - customerId - id - - objectStorageId + - privateNetworkId - requestId - tenantId - timestamp - traceId - username type: object - ListObjectStorageAuditResponse: + ListPrivateNetworkAuditResponse: example: data: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - objectStorageId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + privateNetworkId: 12345 changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE @@ -11480,9 +11723,9 @@ components: action: CREATED id: 12345 timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe + username: John Doe - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - objectStorageId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + privateNetworkId: 12345 changedBy: "54321" requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE @@ -11495,13 +11738,13 @@ components: action: CREATED id: 12345 timestamp: 2021-03-30T11:35:06.177Z - username: John.Doe + username: John Doe _links: - first: /v1/object-storages/audits?page=2 - previous: /v1/object-storages/audits?page=2 - next: /v1/object-storages/audits?page=3 - last: /v1/object-storages/audits?page=10 - self: /v1/object-storages/audits + first: /v1/private-networks/audits?page=2 + previous: /v1/private-networks/audits?page=2 + next: /v1/private-networks/audits?page=3 + last: /v1/private-networks/audits?page=10 + self: /v1/private-networks/audits _pagination: "" properties: _pagination: @@ -11510,168 +11753,78 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ObjectStorageAuditResponse' + $ref: '#/components/schemas/PrivateNetworkAuditResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/object-storages/audits?page=2 - previous: /v1/object-storages/audits?page=2 - next: /v1/object-storages/audits?page=3 - last: /v1/object-storages/audits?page=10 - self: /v1/object-storages/audits + first: /v1/private-networks/audits?page=2 + previous: /v1/private-networks/audits?page=2 + next: /v1/private-networks/audits?page=3 + last: /v1/private-networks/audits?page=10 + self: /v1/private-networks/audits required: - _links - _pagination - data type: object - PrivateIpConfig: - example: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - properties: - v4: - items: - $ref: '#/components/schemas/IpV4' - type: array - required: - - v4 - type: object - Instances: + TicketCreateRequest: example: - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok + assignedGroup: Support + sourceClient: Website + subject: New support ticket + description: Some details on the issue + type: Incident + tags: '["test","beta"]' properties: - instanceId: - description: Instance id - example: 100 - format: int64 - type: integer - displayName: - description: Instance display name - example: Instance + description: + description: Ticket description + example: Some details on the issue type: string - name: - description: Instance name - example: vmd12345 + subject: + description: Ticket subject + example: New support ticket type: string - productId: - description: Product id - example: V1 + tags: + description: Ticket tags + example: '["test","beta"]' + items: + type: string + type: array + type: + description: Ticket type + example: Incident type: string - privateIpConfig: - $ref: '#/components/schemas/PrivateIpConfig' - ipConfig: - $ref: '#/components/schemas/IpConfig' - status: - description: State of the instance in the Private Network - enum: - - ok - - restart - - reinstall - - reinstallation failed - - installing - example: ok + assignedGroup: + description: Ticket Group + example: Support type: string - errorMessage: - description: Message in case of an error. + sourceClient: + description: Ticket Source + example: Website type: string required: - - displayName - - instanceId - - ipConfig - - name - - privateIpConfig - - productId - - status + - description + - sourceClient + - subject + - type type: object - ListPrivateNetworkResponseData: + TicketResponse: example: - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + subject: New support ticket + description: Some details on the issue + updatedDate: 2023-11-14T10:22:48Z + priority: low + type: Incident + tags: '["test","beta"]' + createdDate: 2023-11-13T11:22:48Z tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU + isEscalated: false + email: test-customer@test.com + ticketId: 1234 + status: open properties: tenantId: description: Your customer tenant id @@ -11683,188 +11836,277 @@ components: example: "54321" minLength: 1 type: string - privateNetworkId: - description: Private Network's id - example: 12345 - format: int64 - type: integer - dataCenter: - description: The data center where your Private Network is located - example: European Union (Germany) 1 + email: + description: Ticket email + example: test-customer@test.com type: string - region: - description: The slug of the region where your Private Network is located - example: EU + isEscalated: + description: Ticket escalated flag + example: false + type: boolean + priority: + description: Ticket priority + enum: + - low + - medium + - high + - urgent + example: low type: string - regionName: - description: The region where your Private Network is located - example: European Union (Germany) + status: + description: Ticket status + enum: + - open + - pending + - resolved + - closed + example: open type: string - name: - description: The name of the Private Network - example: myPrivateNetwork + subject: + description: Ticket subject + example: New support ticket type: string description: - description: The description of the Private Network - example: myPrivateNetwork Description - type: string - cidr: - description: The cidr range of the Private Network - example: 10.0.0.0/22 + description: Ticket description + example: Some details on the issue type: string - availableIps: - description: The total available IPs of the Private Network - example: 1022 - format: int64 - type: integer createdDate: - description: The creation date of the Private Network - example: 2021-06-03T06:27:12Z - format: date-time + description: Created Date + example: 2023-11-13T11:22:48Z type: string - instances: + updatedDate: + description: Created Date + example: 2023-11-14T10:22:48Z + type: string + tags: + description: Ticket tags + example: '["test","beta"]' items: - $ref: '#/components/schemas/Instances' + type: string type: array + ticketId: + description: Ticket ID + example: 1234 + format: int64 + type: integer + type: + description: Ticket type + example: Incident + type: string required: - - availableIps - - cidr - createdDate - customerId - - dataCenter - description - - instances - - name - - privateNetworkId - - region - - regionName + - email + - isEscalated + - priority + - status + - subject + - tags - tenantId + - ticketId + - type + - updatedDate type: object - ListPrivateNetworkResponse: + TicketCreateResponse: example: data: - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + - subject: New support ticket + description: Some details on the issue + updatedDate: 2023-11-14T10:22:48Z + priority: low + type: Incident + tags: '["test","beta"]' + createdDate: 2023-11-13T11:22:48Z tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + isEscalated: false + email: test-customer@test.com + ticketId: 1234 + status: open + - subject: New support ticket + description: Some details on the issue + updatedDate: 2023-11-14T10:22:48Z + priority: low + type: Incident + tags: '["test","beta"]' + createdDate: 2023-11-13T11:22:48Z + tenantId: DE + customerId: "54321" + isEscalated: false + email: test-customer@test.com + ticketId: 1234 + status: open + _links: + self: v1/tickets/123 + properties: + data: + items: + $ref: '#/components/schemas/TicketResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: v1/tickets/123 + required: + - _links + - data + type: object + MetadataType: + example: + tenantId: DE + customerId: "54321" + name: type + availableChoices: '["Choice 1", "Choice 2"]' + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your customer number + example: "54321" + minLength: 1 + type: string + name: + description: Type name + example: type + type: string + availableChoices: + description: Available choices + example: '["Choice 1", "Choice 2"]' + items: + type: string + type: array + required: + - availableChoices + - customerId + - name + - tenantId + type: object + ListTicketMetadataResponse: + example: + data: + - tenantId: DE + customerId: "54321" + name: type + availableChoices: '["Choice 1", "Choice 2"]' + - tenantId: DE + customerId: "54321" + name: type + availableChoices: '["Choice 1", "Choice 2"]' + _links: + self: v1/tickets/metadata + properties: + data: + items: + $ref: '#/components/schemas/MetadataType' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: v1/tickets/metadata + required: + - _links + - data + type: object + SecretResponse: + example: + createdAt: 2021-06-03T06:27:12Z + tenantId: DE + customerId: "54321" + name: Password Secret + secretId: 12345 + type: password + value: password + updatedAt: 2021-06-03T06:27:12Z + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your Customer number + example: "54321" + minLength: 1 + type: string + secretId: + description: Secret's id + example: 12345 + minimum: 0 + type: number + name: + description: The name assigned to the password/ssh + example: Password Secret + maxLength: 255 + minLength: 1 + type: string + type: + description: The type of the secret. This will be available only when retrieving + secrets + enum: + - password + - ssh + example: password + maxLength: 500 + minLength: 1 + type: string + value: + description: The value of the secret. This will be available only when retrieving + a single secret + example: password + maxLength: 500 + minLength: 1 + type: string + createdAt: + description: The creation date for the secret + example: 2021-06-03T06:27:12Z + format: date-time + type: string + updatedAt: + description: The last update date for the secret + example: 2021-06-03T06:27:12Z + format: date-time + type: string + required: + - createdAt + - customerId + - name + - secretId + - tenantId + - type + - updatedAt + - value + type: object + ListSecretResponse: + example: + data: + - createdAt: 2021-06-03T06:27:12Z tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU + name: Password Secret + secretId: 12345 + type: password + value: password + updatedAt: 2021-06-03T06:27:12Z + - createdAt: 2021-06-03T06:27:12Z + tenantId: DE + customerId: "54321" + name: Password Secret + secretId: 12345 + type: password + value: password + updatedAt: 2021-06-03T06:27:12Z _links: - first: /v1/private-networks?page=1 - previous: /v1/private-networks?page=19 - self: /v1/private-networks?page=20 - next: /v1/private-networks?page=21 - last: /v1/private-networks?page=101 + self: /v1/secrets + first: /v1/secrets?page=1 + previous: /v1/secrets?page=19 + next: /v1/secrets?page=21 + last: /v1/secrets?page=101 _pagination: "" properties: _pagination: @@ -11873,818 +12115,665 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/ListPrivateNetworkResponseData' + $ref: '#/components/schemas/SecretResponse' type: array _links: allOf: - - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/SelfLinks' example: - first: /v1/private-networks?page=1 - previous: /v1/private-networks?page=19 - self: /v1/private-networks?page=20 - next: /v1/private-networks?page=21 - last: /v1/private-networks?page=101 + self: /v1/secrets + first: /v1/secrets?page=1 + previous: /v1/secrets?page=19 + next: /v1/secrets?page=21 + last: /v1/secrets?page=101 required: - _links - _pagination - data type: object - CreatePrivateNetworkRequest: + CreateSecretRequest: example: - name: myPrivateNetwork - description: myPrivateNetwork Description - region: EU + name: my-password + type: password + value: PwdA?2092w# properties: - region: - default: EU - description: Region where the Private Network should be located. Default - is `EU` - example: EU - minLength: 1 - type: string name: - description: The name of the Private Network. It may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - Private Network name. - example: myPrivateNetwork + description: The name of the secret that will keep the password + example: my-password maxLength: 255 minLength: 1 type: string - description: - description: The description of the Private Network. There is a limit of - 255 characters per Private Network description. - example: myPrivateNetwork Description - maxLength: 255 + value: + description: 'The secret value that needs to be saved. In case of a password + it must match a pattern with at least one upper and lower case character + and either one number with two special characters `!@#$^&*?_~` or at least + three numbers with one special character `!@#$^&*?_~`. This is expressed + in the following regular expression: `^((?=.*?[A-Z]{1,})(?=.*?[a-z]{1,}))(((?=(?:[^d]*d){1})(?=([^^&*?_~]*[!@#$^&*?_~]){2,}))|((?=(?:[^d]*d){3})(?=.*?[!@#$^&*?_~]+))).{8,}$`' + example: PwdA?2092w# + minLength: 8 + type: string + type: + description: The type of the secret. Can be `password` or `ssh` + enum: + - password + - ssh + example: password type: string required: - name + - type + - value type: object - PrivateNetworkResponse: + CreateSecretResponse: example: - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + data: + - createdAt: 2021-06-03T06:27:12Z + tenantId: DE + customerId: "54321" + name: Password Secret + secretId: 12345 + type: password + value: password + updatedAt: 2021-06-03T06:27:12Z + - createdAt: 2021-06-03T06:27:12Z + tenantId: DE + customerId: "54321" + name: Password Secret + secretId: 12345 + type: password + value: password + updatedAt: 2021-06-03T06:27:12Z + _links: + self: /v1/secrets/123 + properties: + data: + items: + $ref: '#/components/schemas/SecretResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/secrets/123 + required: + - _links + - data + type: object + FindSecretResponse: + example: + data: + - createdAt: 2021-06-03T06:27:12Z + tenantId: DE + customerId: "54321" + name: Password Secret + secretId: 12345 + type: password + value: password + updatedAt: 2021-06-03T06:27:12Z + - createdAt: 2021-06-03T06:27:12Z + tenantId: DE + customerId: "54321" + name: Password Secret + secretId: 12345 + type: password + value: password + updatedAt: 2021-06-03T06:27:12Z + _links: + self: /v1/secrets/123 + properties: + data: + items: + $ref: '#/components/schemas/SecretResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/secrets/123 + required: + - _links + - data + type: object + UpdateSecretRequest: + example: + name: name + value: value + properties: + name: + description: The name of the secret to be saved + type: string + value: + description: The value of the secret to be saved + minLength: 8 + type: string + type: object + UpdateSecretResponse: + example: + _links: + self: /v1/secrets/123 + properties: + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + description: Links for easy navigation. + example: + self: /v1/secrets/123 + required: + - _links + type: object + SecretAuditResponse: + example: + traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + changedBy: "54321" + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU + changes: + prev: + name: test + new: + name: test1 + secretId: 12345 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John Doe properties: + id: + description: The identifier of the audit entry. + example: 12345 + type: number + secretId: + description: Secret's id + example: 12345 + minimum: 0 + type: number + action: + description: Type of the action. + enum: + - CREATED + - UPDATED + - DELETED + example: CREATED + type: string + timestamp: + description: When the change took place. + example: 2021-03-30T11:35:06.177Z + format: date-time + type: string tenantId: - description: Your customer tenant id + description: Customer tenant id example: DE minLength: 1 type: string customerId: - description: Your customer number + description: Customer number example: "54321" minLength: 1 type: string - privateNetworkId: - description: Private Network's id - example: 12345 - format: int64 - type: integer - dataCenter: - description: The data center where your Private Network is located - example: European Union (Germany) 1 - type: string - region: - description: The slug of the region where your Private Network is located - example: EU - type: string - regionName: - description: The region where your Private Network is located - example: European Union (Germany) - type: string - name: - description: The name of the Private Network - example: myPrivateNetwork + changedBy: + description: User ID + example: "54321" + minLength: 1 type: string - description: - description: The description of the Private Network - example: myPrivateNetwork Description + username: + description: Name of the user which led to the change. + example: John Doe type: string - cidr: - description: The cidr range of the Private Network - example: 10.0.0.0/22 + requestId: + description: The requestId of the API call which led to the change. + example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 type: string - availableIps: - description: The total available IPs of the Private Network - example: 1022 - format: int64 - type: integer - createdDate: - description: The creation date of the Private Network - example: 2021-06-03T06:27:12Z - format: date-time + traceId: + description: The traceId of the API call which led to the change. + example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - instances: - items: - $ref: '#/components/schemas/Instances' - type: array + changes: + description: List of actual changes. + example: + prev: + name: test + new: + name: test1 + type: object required: - - availableIps - - cidr - - createdDate + - action + - changedBy - customerId - - dataCenter - - description - - instances - - name - - privateNetworkId - - region - - regionName - - tenantId - type: object - CreatePrivateNetworkResponse: - example: - data: - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) - tenantId: DE - customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + - id + - requestId + - secretId + - tenantId + - timestamp + - traceId + - username + type: object + ListSecretAuditResponse: + example: + data: + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + changedBy: "54321" + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU + changes: + prev: + name: test + new: + name: test1 + secretId: 12345 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John Doe + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + changedBy: "54321" + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + tenantId: DE + customerId: "54321" + changes: + prev: + name: test + new: + name: test1 + secretId: 12345 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John Doe _links: - self: /v1/private-networks/12345 + first: /v1/secrets/audits?page=1 + previous: /v1/secrets/audits?page=19 + self: /v1/secrets/audits?page=20 + next: /v1/secrets/audits?page=21 + last: /v1/secrets/audits?page=101 + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/PrivateNetworkResponse' + $ref: '#/components/schemas/SecretAuditResponse' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/private-networks/12345 + first: /v1/secrets/audits?page=1 + previous: /v1/secrets/audits?page=19 + self: /v1/secrets/audits?page=20 + next: /v1/secrets/audits?page=21 + last: /v1/secrets/audits?page=101 required: - _links + - _pagination - data type: object - PatchPrivateNetworkRequest: + InstanceStartActionResponseData: example: - name: myPrivateNetwork - description: myPrivateNetwork Description + instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start properties: - name: - description: The name of the Private Network. It may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - Private Network. - example: myPrivateNetwork - maxLength: 255 + tenantId: + description: Your customer tenant id + example: DE minLength: 1 type: string - description: - description: The description of the Private Network. There is a limit of - 255 characters per Private Network. - example: myPrivateNetwork Description - maxLength: 255 + customerId: + description: Your customer number + example: "54321" + minLength: 1 + type: string + instanceId: + description: Compute instance / resource id + example: 12345 + format: int64 + type: integer + action: + description: Action that was triggered + example: start type: string + required: + - action + - customerId + - instanceId + - tenantId type: object - PatchPrivateNetworkResponse: + InstanceStartActionResponse: example: data: - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + - instanceId: 12345 tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + action: start + - instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start + _links: + self: /v1/compute/instances/12345/actions/start + properties: + data: + items: + $ref: '#/components/schemas/InstanceStartActionResponseData' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/compute/instances/12345/actions/start + required: + - _links + - data + type: object + InstanceRestartActionResponseData: + example: + instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your customer number + example: "54321" + minLength: 1 + type: string + instanceId: + description: Compute instance / resource id + example: 12345 + format: int64 + type: integer + action: + description: Action that was triggered + example: start + type: string + required: + - action + - customerId + - instanceId + - tenantId + type: object + InstanceRestartActionResponse: + example: + data: + - instanceId: 12345 tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU + action: start + - instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start _links: - self: /v1/private-networks/12345 + self: /v1/compute/instances/12345/actions/restart properties: data: items: - $ref: '#/components/schemas/PrivateNetworkResponse' + $ref: '#/components/schemas/InstanceRestartActionResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/private-networks/12345 + self: /v1/compute/instances/12345/actions/restart required: - _links - data type: object - FindPrivateNetworkResponse: + InstanceStopActionResponseData: + example: + instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your customer number + example: "54321" + minLength: 1 + type: string + instanceId: + description: Compute instance / resource id + example: 12345 + format: int64 + type: integer + action: + description: Action that was triggered + example: start + type: string + required: + - action + - customerId + - instanceId + - tenantId + type: object + InstanceStopActionResponse: example: data: - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + - instanceId: 12345 tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU - - createdDate: 2021-06-03T06:27:12Z - privateNetworkId: 12345 - dataCenter: European Union (Germany) 1 - availableIps: 1022 - instances: - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - - ipConfig: - v6: - netmaskCidr: 64 - ip: 1:2:3:4:5:6:7:8 - gateway: 1:2:3:4:5:6:7:8 - v4: - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - instanceId: 100 - productId: V1 - displayName: Instance - name: vmd12345 - errorMessage: errorMessage - privateIpConfig: - v4: - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - - netmaskCidr: 19 - ip: 192.168.0.1 - gateway: 1.1.1.1 - status: ok - regionName: European Union (Germany) + action: start + - instanceId: 12345 tenantId: DE customerId: "54321" - name: myPrivateNetwork - description: myPrivateNetwork Description - cidr: 10.0.0.0/22 - region: EU + action: start _links: - self: /v1/private-networks/12345 + self: /v1/compute/instances/12345/actions/stop properties: data: items: - $ref: '#/components/schemas/PrivateNetworkResponse' + $ref: '#/components/schemas/InstanceStopActionResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/private-networks/12345 + self: /v1/compute/instances/12345/actions/stop required: - _links - data type: object - InstanceAssignmentSelfLinks: + InstanceShutdownActionResponseData: + example: + instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start properties: - self: - description: Link to current resource. + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 type: string - virtualPrivateCloud: - description: Link to related Private Network. + customerId: + description: Your customer number + example: "54321" + minLength: 1 type: string - instance: - description: Link to assigned instance. + instanceId: + description: Compute instance / resource id + example: 12345 + format: int64 + type: integer + action: + description: Action that was triggered + example: start type: string required: - - instance - - self - - virtualPrivateCloud - type: object - AssignInstancePrivateNetworkResponse: - example: - _links: - self: /v1/private-networks/12345/instances/100 - virtualPrivateCloud: /v1/private-networks/12345 - instance: /v1/compute/instances/100 - properties: - _links: - allOf: - - $ref: '#/components/schemas/InstanceAssignmentSelfLinks' - description: Links for easy navigation. - example: - self: /v1/private-networks/12345/instances/100 - virtualPrivateCloud: /v1/private-networks/12345 - instance: /v1/compute/instances/100 - required: - - _links + - action + - customerId + - instanceId + - tenantId type: object - UnassignInstancePrivateNetworkResponse: + InstanceShutdownActionResponse: example: + data: + - instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start + - instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start _links: - self: /v1/private-networks/12345/instances/100 - virtualPrivateCloud: /v1/private-networks/12345 - instance: /v1/compute/instances/100 + self: /v1/compute/instances/12345/actions/shutdown properties: + data: + items: + $ref: '#/components/schemas/InstanceShutdownActionResponseData' + type: array _links: allOf: - - $ref: '#/components/schemas/InstanceAssignmentSelfLinks' - description: Links for easy navigation. + - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/private-networks/12345/instances/100 - virtualPrivateCloud: /v1/private-networks/12345 - instance: /v1/compute/instances/100 + self: /v1/compute/instances/12345/actions/shutdown required: - _links + - data type: object - PrivateNetworkAuditResponse: + InstancesActionsRescueRequest: example: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - privateNetworkId: 12345 - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - tenantId: DE - customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe + userData: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ + ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ + \ \n expire: False\n" + sshKeys: '[123, 125]' + rootPassword: 1 properties: - id: - description: The identifier of the audit entry. - example: 12345 + rootPassword: + description: '`secretId` of the password to login into rescue system for + the `root` user.' + example: 1 format: int64 type: integer - privateNetworkId: - description: The identifier of the Private Network - example: 12345 - minimum: 0 - type: number - action: - description: Type of the action. - enum: - - CREATED - - DELETED - - UPDATED - example: CREATED - type: string - timestamp: - description: When the change took place. - example: 2021-03-30T11:35:06.177Z - format: date-time + sshKeys: + description: Array of `secretId`s of public SSH keys for logging into rescue + system as `root` user. + example: '[123, 125]' + items: + format: int64 + type: integer + type: array + userData: + description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize + during start of compute instance.' + example: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ + ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ + \ \n expire: False\n" type: string + type: object + InstanceRescueActionResponseData: + example: + instanceId: 12345 + tenantId: DE + customerId: "54321" + action: start + properties: tenantId: - description: Customer tenant id + description: Your customer tenant id example: DE minLength: 1 type: string customerId: - description: Customer number - example: "54321" - minLength: 1 - type: string - changedBy: - description: User id + description: Your customer number example: "54321" minLength: 1 type: string - username: - description: User name which did the change. - example: John Doe - type: string - requestId: - description: The requestId of the API call which led to the change. - example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - type: string - traceId: - description: The traceId of the API call which led to the change. - example: 78E9A428-94E9-4A2A-92F5-26038C6884F + instanceId: + description: Compute instance / resource id + example: 12345 + format: int64 + type: integer + action: + description: Action that was triggered + example: start type: string - changes: - description: List of actual changes. - example: - prev: - name: test - new: - name: test1 - type: object required: - action - - changedBy - customerId - - id - - privateNetworkId - - requestId + - instanceId - tenantId - - timestamp - - traceId - - username type: object - ListPrivateNetworkAuditResponse: + InstanceRescueActionResponse: example: data: - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - privateNetworkId: 12345 - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + - instanceId: 12345 tenantId: DE customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - privateNetworkId: 12345 - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + action: start + - instanceId: 12345 tenantId: DE customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe + action: start _links: - first: /v1/private-networks/audits?page=2 - previous: /v1/private-networks/audits?page=2 - next: /v1/private-networks/audits?page=3 - last: /v1/private-networks/audits?page=10 - self: /v1/private-networks/audits - _pagination: "" + self: /v1/compute/instances/12345/actions/rescue properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/PrivateNetworkAuditResponse' + $ref: '#/components/schemas/InstanceRescueActionResponseData' type: array _links: allOf: - - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/SelfLinks' example: - first: /v1/private-networks/audits?page=2 - previous: /v1/private-networks/audits?page=2 - next: /v1/private-networks/audits?page=3 - last: /v1/private-networks/audits?page=10 - self: /v1/private-networks/audits + self: /v1/compute/instances/12345/actions/rescue required: - _links - - _pagination - data type: object - SecretResponse: + InstancesResetPasswordActionsRequest: example: - createdAt: 2021-06-03T06:27:12Z + userData: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ + ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ + \ \n expire: False\n" + sshKeys: '[123, 125]' + rootPassword: 1 + properties: + sshKeys: + description: Array of `secretId`s of public SSH keys for logging into as + `defaultUser` with administrator/root privileges. Applies to Linux/BSD + systems. Please refer to Secrets Management API. + example: '[123, 125]' + items: + format: int64 + type: integer + type: array + rootPassword: + description: '`secretId` of the password for the `defaultUser` with administrator/root + privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer + to Secrets Management API.' + example: 1 + format: int64 + type: integer + userData: + description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize + during start of compute instance.' + example: "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\n\ + ssh_authorized_keys:\n - \nchpasswd:\n list:\n - root:\ + \ \n expire: False\n" + type: string + type: object + InstanceResetPasswordActionResponseData: + example: + instanceId: 12345 tenantId: DE customerId: "54321" - name: Password Secret - secretId: 12345 - type: password - value: password - updatedAt: 2021-06-03T06:27:12Z + action: start properties: tenantId: description: Your customer tenant id @@ -12692,498 +12781,790 @@ components: minLength: 1 type: string customerId: - description: Your Customer number - example: "54321" - minLength: 1 - type: string - secretId: - description: Secret's id - example: 12345 - minimum: 0 - type: number - name: - description: The name assigned to the password/ssh - example: Password Secret - maxLength: 255 - minLength: 1 - type: string - type: - description: The type of the secret. This will be available only when retrieving - secrets - enum: - - password - - ssh - example: password - maxLength: 500 - minLength: 1 - type: string - value: - description: The value of the secret. This will be available only when retrieving - a single secret - example: password - maxLength: 500 - minLength: 1 - type: string - createdAt: - description: The creation date for the secret - example: 2021-06-03T06:27:12Z - format: date-time + description: Your customer number + example: "54321" + minLength: 1 type: string - updatedAt: - description: The last update date for the secret - example: 2021-06-03T06:27:12Z - format: date-time + instanceId: + description: Compute instance / resource id + example: 12345 + format: int64 + type: integer + action: + description: Action that was triggered + example: start type: string required: - - createdAt + - action - customerId - - name - - secretId + - instanceId - tenantId - - type - - updatedAt - - value type: object - ListSecretResponse: + InstanceResetPasswordActionResponse: example: data: - - createdAt: 2021-06-03T06:27:12Z + - instanceId: 12345 tenantId: DE customerId: "54321" - name: Password Secret - secretId: 12345 - type: password - value: password - updatedAt: 2021-06-03T06:27:12Z - - createdAt: 2021-06-03T06:27:12Z + action: start + - instanceId: 12345 tenantId: DE customerId: "54321" - name: Password Secret - secretId: 12345 - type: password - value: password - updatedAt: 2021-06-03T06:27:12Z + action: start _links: - self: /v1/secrets - first: /v1/secrets?page=1 - previous: /v1/secrets?page=19 - next: /v1/secrets?page=21 - last: /v1/secrets?page=101 - _pagination: "" + self: /v1/compute/instances/12345/actions/resetPassword properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/SecretResponse' + $ref: '#/components/schemas/InstanceResetPasswordActionResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/secrets - first: /v1/secrets?page=1 - previous: /v1/secrets?page=19 - next: /v1/secrets?page=21 - last: /v1/secrets?page=101 + self: /v1/compute/instances/12345/actions/resetPassword required: - _links - - _pagination - data type: object - CreateSecretRequest: + AdditionalIp: example: - name: my-password - type: password - value: PwdA?2092w# + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 properties: - name: - description: The name of the secret that will keep the password - example: my-password - maxLength: 255 + v4: + $ref: '#/components/schemas/IpV4' + required: + - v4 + type: object + instanceStatus: + enum: + - provisioning + - uninstalled + - running + - stopped + - error + - installing + - unknown + - manual_provisioning + - product_not_available + - verification_required + - rescue + - pending_payment + - other + type: string + AddOnResponse: + example: + quantity: 4 + id: 1431 + properties: + id: + description: Id of the Addon. Please refer to list [here](https://contabo.com/en/product-list/?show_ids=true). + example: 1431 + format: int64 + type: integer + quantity: + description: The number of Addons you wish to aquire. + example: 4 + format: int64 + type: integer + required: + - id + - quantity + type: object + ListInstancesResponseData: + example: + cancelDate: 2021-06-03T00:00:00.000+0000 + displayName: VPS + regionName: European Union (Germany) + productName: VPS M + instanceId: 100 + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + osType: Linux + defaultUser: root + sshKeys: + - 123 + - 125 + productType: ssd + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V5 + dataCenter: European Union (Germany) 1 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 + ramMb: 1024 + errorMessage: errorMessage + additionalIps: + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + diskMb: 2048 + macAddress: F2:65:50:F3:63:A1 + createdDate: 2021-06-03T06:27:12Z + cpuCores: 4 + vHostId: 73395 + tenantId: DE + name: vmd12345 + region: EU + properties: + tenantId: + description: Your customer tenant id + enum: + - DE + - INT + example: DE + minLength: 1 + type: string + customerId: + description: Customer ID + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 minLength: 1 type: string - value: - description: 'The secret value that needs to be saved. In case of a password - it must match a pattern with at least one upper and lower case character - and either one number with two special characters `!@#$^&*?_~` or at least - three numbers with one special character `!@#$^&*?_~`. This is expressed - in the following regular expression: `^((?=.*?[A-Z]{1,})(?=.*?[a-z]{1,}))(((?=(?:[^d]*d){1})(?=([^^&*?_~]*[!@#$^&*?_~]){2,}))|((?=(?:[^d]*d){3})(?=.*?[!@#$^&*?_~]+))).{8,}$`' - example: PwdA?2092w# - minLength: 8 + additionalIps: + items: + $ref: '#/components/schemas/AdditionalIp' + type: array + name: + description: Instance Name + example: vmd12345 + type: string + displayName: + description: Instance display name + example: VPS + type: string + instanceId: + description: Instance ID + example: 100 + format: int64 + type: integer + dataCenter: + description: The data center where your Private Network is located + example: European Union (Germany) 1 + type: string + region: + description: Instance region where the compute instance should be located. + example: EU + type: string + regionName: + description: The name of the region where the instance is located. + example: European Union (Germany) + type: string + productId: + description: Product ID + example: V5 + type: string + imageId: + description: Image's id + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string + ipConfig: + $ref: '#/components/schemas/IpConfig' + macAddress: + description: MAC Address + example: F2:65:50:F3:63:A1 + type: string + ramMb: + description: Image RAM size in MB + example: 1024 + type: number + cpuCores: + description: CPU core count + example: 4 + format: int64 + type: integer + osType: + description: Type of operating system (OS) + example: Linux + type: string + diskMb: + description: Image Disk size in MB + example: 2048 + type: number + sshKeys: + description: Array of `secretId`s of public SSH keys for logging into as + `defaultUser` with administrator/root privileges. Applies to Linux/BSD + systems. Please refer to Secrets Management API. + example: + - 123 + - 125 + items: + format: int64 + type: integer + type: array + createdDate: + description: The creation date for the instance + example: 2021-06-03T06:27:12Z + format: date-time + type: string + cancelDate: + description: The date on which the instance will be cancelled + example: 2021-06-03 + format: date + maxLength: 10 + minLength: 0 + pattern: yyyy-mm-dd + type: string + status: + $ref: '#/components/schemas/instanceStatus' + vHostId: + description: ID of host system + example: 73395 + format: int64 + type: integer + addOns: + items: + $ref: '#/components/schemas/AddOnResponse' + type: array + errorMessage: + description: Message in case of an error. type: string - type: - description: The type of the secret. Can be `password` or `ssh` + productType: + description: Instance's category depending on Product Id enum: - - password - - ssh - example: password + - hdd + - ssd + - vds + - nvme + example: ssd + type: string + productName: + description: Instance's Product Name + example: VPS M + type: string + defaultUser: + description: Default user name created for login during (re-)installation + with administrative privileges. Allowed values for Linux/BSD are `admin` + (use sudo to apply administrative privileges like root) or `root`. Allowed + values for Windows are `admin` (has administrative privileges like administrator) + or `administrator`. + enum: + - root + - admin + - administrator + example: root type: string required: + - addOns + - additionalIps + - cancelDate + - cpuCores + - createdDate + - customerId + - dataCenter + - diskMb + - displayName + - imageId + - instanceId + - ipConfig + - macAddress - name - - type - - value - type: object - CreateSecretResponse: - example: - data: - - createdAt: 2021-06-03T06:27:12Z - tenantId: DE - customerId: "54321" - name: Password Secret - secretId: 12345 - type: password - value: password - updatedAt: 2021-06-03T06:27:12Z - - createdAt: 2021-06-03T06:27:12Z - tenantId: DE - customerId: "54321" - name: Password Secret - secretId: 12345 - type: password - value: password - updatedAt: 2021-06-03T06:27:12Z - _links: - self: /v1/secrets/123 - properties: - data: - items: - $ref: '#/components/schemas/SecretResponse' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/secrets/123 - required: - - _links - - data + - osType + - productId + - productName + - productType + - ramMb + - region + - regionName + - sshKeys + - status + - tenantId + - vHostId type: object - FindSecretResponse: + ListInstancesResponse: example: data: - - createdAt: 2021-06-03T06:27:12Z + - cancelDate: 2021-06-03T00:00:00.000+0000 + displayName: VPS + regionName: European Union (Germany) + productName: VPS M + instanceId: 100 + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + osType: Linux + defaultUser: root + sshKeys: + - 123 + - 125 + productType: ssd + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V5 + dataCenter: European Union (Germany) 1 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 + ramMb: 1024 + errorMessage: errorMessage + additionalIps: + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + diskMb: 2048 + macAddress: F2:65:50:F3:63:A1 + createdDate: 2021-06-03T06:27:12Z + cpuCores: 4 + vHostId: 73395 tenantId: DE - customerId: "54321" - name: Password Secret - secretId: 12345 - type: password - value: password - updatedAt: 2021-06-03T06:27:12Z - - createdAt: 2021-06-03T06:27:12Z + name: vmd12345 + region: EU + - cancelDate: 2021-06-03T00:00:00.000+0000 + displayName: VPS + regionName: European Union (Germany) + productName: VPS M + instanceId: 100 + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + osType: Linux + defaultUser: root + sshKeys: + - 123 + - 125 + productType: ssd + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V5 + dataCenter: European Union (Germany) 1 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 + ramMb: 1024 + errorMessage: errorMessage + additionalIps: + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + diskMb: 2048 + macAddress: F2:65:50:F3:63:A1 + createdDate: 2021-06-03T06:27:12Z + cpuCores: 4 + vHostId: 73395 tenantId: DE - customerId: "54321" - name: Password Secret - secretId: 12345 - type: password - value: password - updatedAt: 2021-06-03T06:27:12Z - _links: - self: /v1/secrets/123 - properties: - data: - items: - $ref: '#/components/schemas/SecretResponse' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/secrets/123 - required: - - _links - - data - type: object - UpdateSecretRequest: - example: - name: name - value: value - properties: - name: - description: The name of the secret to be saved - type: string - value: - description: The value of the secret to be saved - minLength: 8 - type: string - type: object - UpdateSecretResponse: - example: + name: vmd12345 + region: EU _links: - self: /v1/secrets/123 + first: /v1/compute/instances?page=1 + previous: /v1/compute/instances?page=19 + self: /v1/compute/instances?page=20 + next: /v1/compute/instances?page=21 + last: /v1/compute/instances?page=101 + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. + data: + items: + $ref: '#/components/schemas/ListInstancesResponseData' + type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' - description: Links for easy navigation. + - $ref: '#/components/schemas/Links' example: - self: /v1/secrets/123 + first: /v1/compute/instances?page=1 + previous: /v1/compute/instances?page=19 + self: /v1/compute/instances?page=20 + next: /v1/compute/instances?page=21 + last: /v1/compute/instances?page=101 required: - _links + - _pagination + - data type: object - SecretAuditResponse: + InstanceResponse: example: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + cancelDate: 2021-06-03T00:00:00.000+0000 + displayName: VPS + regionName: European Union (Germany) + productName: VPS M + instanceId: 100 + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + osType: Linux + defaultUser: root + sshKeys: + - 123 + - 125 + productType: ssd + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V5 + dataCenter: European Union (Germany) 1 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 + ramMb: 1024 + errorMessage: errorMessage + additionalIps: + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + diskMb: 2048 + macAddress: F2:65:50:F3:63:A1 + createdDate: 2021-06-03T06:27:12Z + cpuCores: 4 + vHostId: 73395 tenantId: DE - customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - secretId: 12345 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe + name: vmd12345 + region: EU properties: - id: - description: The identifier of the audit entry. - example: 12345 - type: number - secretId: - description: Secret's id - example: 12345 - minimum: 0 - type: number - action: - description: Type of the action. - enum: - - CREATED - - UPDATED - - DELETED - example: CREATED - type: string - timestamp: - description: When the change took place. - example: 2021-03-30T11:35:06.177Z - format: date-time - type: string tenantId: - description: Customer tenant id + description: Your customer tenant id + enum: + - DE + - INT example: DE minLength: 1 type: string customerId: - description: Customer number - example: "54321" + description: Customer ID + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 minLength: 1 type: string - changedBy: - description: User ID - example: "54321" - minLength: 1 + additionalIps: + items: + $ref: '#/components/schemas/AdditionalIp' + type: array + name: + description: Instance Name + example: vmd12345 type: string - username: - description: Name of the user which led to the change. - example: John Doe + displayName: + description: Instance display name + example: VPS type: string - requestId: - description: The requestId of the API call which led to the change. - example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + instanceId: + description: Instance ID + example: 100 + format: int64 + type: integer + dataCenter: + description: The data center where your Private Network is located + example: European Union (Germany) 1 type: string - traceId: - description: The traceId of the API call which led to the change. - example: 78E9A428-94E9-4A2A-92F5-26038C6884F + region: + description: Instance region where the compute instance should be located. + example: EU type: string - changes: - description: List of actual changes. + regionName: + description: The name of the region where the instance is located. + example: European Union (Germany) + type: string + productId: + description: Product ID + example: V5 + type: string + imageId: + description: Image's id + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string + ipConfig: + $ref: '#/components/schemas/IpConfig' + macAddress: + description: MAC Address + example: F2:65:50:F3:63:A1 + type: string + ramMb: + description: Image RAM size in MB + example: 1024 + type: number + cpuCores: + description: CPU core count + example: 4 + format: int64 + type: integer + osType: + description: Type of operating system (OS) + example: Linux + type: string + diskMb: + description: Image Disk size in MB + example: 2048 + type: number + sshKeys: + description: Array of `secretId`s of public SSH keys for logging into as + `defaultUser` with administrator/root privileges. Applies to Linux/BSD + systems. Please refer to Secrets Management API. example: - prev: - name: test - new: - name: test1 - type: object - required: - - action - - changedBy - - customerId - - id - - requestId - - secretId - - tenantId - - timestamp - - traceId - - username - type: object - ListSecretAuditResponse: - example: - data: - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - tenantId: DE - customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - secretId: 12345 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - tenantId: DE - customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - secretId: 12345 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe - _links: - first: /v1/secrets/audits?page=1 - previous: /v1/secrets/audits?page=19 - self: /v1/secrets/audits?page=20 - next: /v1/secrets/audits?page=21 - last: /v1/secrets/audits?page=101 - _pagination: "" - properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. - data: + - 123 + - 125 + items: + format: int64 + type: integer + type: array + createdDate: + description: The creation date for the instance + example: 2021-06-03T06:27:12Z + format: date-time + type: string + cancelDate: + description: The date on which the instance will be cancelled + example: 2021-06-03 + format: date + maxLength: 10 + minLength: 0 + pattern: yyyy-mm-dd + type: string + status: + $ref: '#/components/schemas/instanceStatus' + vHostId: + description: ID of host system + example: 73395 + format: int64 + type: integer + addOns: items: - $ref: '#/components/schemas/SecretAuditResponse' + $ref: '#/components/schemas/AddOnResponse' type: array - _links: - allOf: - - $ref: '#/components/schemas/Links' - example: - first: /v1/secrets/audits?page=1 - previous: /v1/secrets/audits?page=19 - self: /v1/secrets/audits?page=20 - next: /v1/secrets/audits?page=21 - last: /v1/secrets/audits?page=101 - required: - - _links - - _pagination - - data - type: object - TagResponse1: - example: - color: '#0A78C3' - tagId: 12345 - tenantId: DE - customerId: "54321" - name: Web-Server - properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 + errorMessage: + description: Message in case of an error. type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 + productType: + description: Instance's category depending on Product Id + enum: + - hdd + - ssd + - vds + - nvme + example: ssd type: string - tagId: - description: Tag's id - example: 12345 - type: number - name: - description: Tag's name - example: Web-Server - maxLength: 255 - minLength: 1 + productName: + description: Instance's Product Name + example: VPS M type: string - color: - description: Tag's color - example: '#0A78C3' - maxLength: 7 - minLength: 4 + defaultUser: + description: Default user name created for login during (re-)installation + with administrative privileges. Allowed values for Linux/BSD are `admin` + (use sudo to apply administrative privileges like root) or `root`. Allowed + values for Windows are `admin` (has administrative privileges like administrator) + or `administrator`. + enum: + - root + - admin + - administrator + example: root type: string required: - - color + - addOns + - additionalIps + - cancelDate + - cpuCores + - createdDate - customerId + - dataCenter + - diskMb + - displayName + - imageId + - instanceId + - ipConfig + - macAddress - name - - tagId + - osType + - productId + - productName + - productType + - ramMb + - region + - regionName + - sshKeys + - status - tenantId + - vHostId type: object - ListTagResponse: + FindInstanceResponse: example: data: - - color: '#0A78C3' - tagId: 12345 + - cancelDate: 2021-06-03T00:00:00.000+0000 + displayName: VPS + regionName: European Union (Germany) + productName: VPS M + instanceId: 100 + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + osType: Linux + defaultUser: root + sshKeys: + - 123 + - 125 + productType: ssd + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V5 + dataCenter: European Union (Germany) 1 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 + ramMb: 1024 + errorMessage: errorMessage + additionalIps: + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + diskMb: 2048 + macAddress: F2:65:50:F3:63:A1 + createdDate: 2021-06-03T06:27:12Z + cpuCores: 4 + vHostId: 73395 tenantId: DE - customerId: "54321" - name: Web-Server - - color: '#0A78C3' - tagId: 12345 + name: vmd12345 + region: EU + - cancelDate: 2021-06-03T00:00:00.000+0000 + displayName: VPS + regionName: European Union (Germany) + productName: VPS M + instanceId: 100 + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + osType: Linux + defaultUser: root + sshKeys: + - 123 + - 125 + productType: ssd + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V5 + dataCenter: European Union (Germany) 1 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 + ramMb: 1024 + errorMessage: errorMessage + additionalIps: + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + - v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + ipConfig: + v6: + netmaskCidr: 64 + ip: 1:2:3:4:5:6:7:8 + gateway: 1:2:3:4:5:6:7:8 + v4: + netmaskCidr: 19 + ip: 192.168.0.1 + gateway: 1.1.1.1 + diskMb: 2048 + macAddress: F2:65:50:F3:63:A1 + createdDate: 2021-06-03T06:27:12Z + cpuCores: 4 + vHostId: 73395 tenantId: DE - customerId: "54321" - name: Web-Server + name: vmd12345 + region: EU _links: - first: /v1/tags?page=1 - previous: /v1/tags?page=19 - self: /v1/tags/12345 - next: /v1/tags?page=21 - last: /v1/tags?page=101 - _pagination: "" + self: /v1/compute/instances/100 properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/TagResponse1' + $ref: '#/components/schemas/InstanceResponse' type: array _links: allOf: - - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/SelfLinks' example: - first: /v1/tags?page=1 - previous: /v1/tags?page=19 - self: /v1/tags/12345 - next: /v1/tags?page=21 - last: /v1/tags?page=101 + self: /v1/compute/instances/100 required: - _links - - _pagination - data type: object - CreateTagRequest: + PatchInstanceRequest: example: - color: '#0A78C3' - name: Web-Server + displayName: VPS + vncEnabled: true properties: - name: - description: The name of the tag. Tags may contain letters, numbers, colons, - dashes, and underscores. There is a limit of 255 characters per tag. - example: Web-Server - maxLength: 255 - minLength: 1 - type: string - color: - default: '#0A78C3' - description: 'The color of the tag. Color can be specified using hexadecimal - value. Default color is #0A78C3' - example: '#0A78C3' - maxLength: 7 - minLength: 4 + displayName: + description: The display name of the instance + example: VPS + maxLength: 255 type: string - required: - - color - - name + vncEnabled: + description: Enable/Disable the VNC option for instance + example: true + type: boolean type: object - CreateTagResponseData: + PatchInstanceResponseData: example: - tagId: 12345 + instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE customerId: "54321" properties: @@ -13197,112 +13578,119 @@ components: example: "54321" minLength: 1 type: string - tagId: - description: Tag's id + instanceId: + description: Instance's id example: 12345 - type: number + format: int64 + type: integer + createdDate: + description: Creation date of the instance + example: 2021-06-02T12:32:03.363Z + format: date-time + type: string required: + - createdDate - customerId - - tagId + - instanceId - tenantId type: object - CreateTagResponse: + PatchInstanceResponse: example: data: - - tagId: 12345 + - instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE customerId: "54321" - - tagId: 12345 + - instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE customerId: "54321" _links: - self: /v1/tags/12345 + self: /v1/compute/instances/12345 properties: data: items: - $ref: '#/components/schemas/CreateTagResponseData' + $ref: '#/components/schemas/PatchInstanceResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/tags/12345 + self: /v1/compute/instances/12345 required: - _links - data type: object - FindTagResponse: + ReinstallInstanceRequest: example: - data: - - color: '#0A78C3' - tagId: 12345 - tenantId: DE - customerId: "54321" - name: Web-Server - - color: '#0A78C3' - tagId: 12345 - tenantId: DE - customerId: "54321" - name: Web-Server - _links: - self: /v1/tags/12345 + imageId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + userData: |- + #cloud-config + user: admin + timezone: Europe/Berlin + chpasswd: + expire: False + defaultUser: root + sshKeys: '[123, 125]' + applicationId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + rootPassword: 1 properties: - data: + imageId: + description: ImageId to be used to setup the compute instance. + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + type: string + sshKeys: + description: Array of `secretId`s of public SSH keys for logging into as + `defaultUser` with administrator/root privileges. Applies to Linux/BSD + systems. Please refer to Secrets Management API. + example: '[123, 125]' items: - $ref: '#/components/schemas/TagResponse1' + format: int64 + type: integer type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/tags/12345 - required: - - _links - - data - type: object - UpdateTagRequest: - example: - color: '#0A78C3' - name: Updated-Web-Server - properties: - name: - description: The name of the tag. Tags may contain letters, numbers, colons, - dashes, and underscores. There is a limit of 255 characters per tag. - example: Updated-Web-Server - maxLength: 255 - minLength: 1 + rootPassword: + description: '`secretId` of the password for the `defaultUser` with administrator/root + privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer + to Secrets Management API.' + example: 1 + format: int64 + type: integer + userData: + description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize + during start of compute instance.' + example: |- + #cloud-config + user: admin + timezone: Europe/Berlin + chpasswd: + expire: False type: string - color: - description: 'The color of the tag. Color can be specified using hexadecimal - value. Default color is #0A78C3' - example: '#0A78C3' - maxLength: 7 - minLength: 4 + defaultUser: + default: admin + description: Default user name created for login during (re-)installation + with administrative privileges. Allowed values for Linux/BSD are `admin` + (use sudo to apply administrative privileges like root) or `root`. Allowed + values for Windows are `admin` (has administrative privileges like administrator) + or `administrator`. + enum: + - root + - admin + - administrator + example: root + type: string + applicationId: + description: Application ID + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 type: string - type: object - UpdateTagResponse: - example: - _links: - self: /v1/tags/12345 - properties: - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - description: Links for easy navigation. - example: - self: /v1/tags/12345 required: - - _links + - imageId type: object - AssignmentResponse: + ReinstallInstanceResponseData: example: - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - tagId: 12345 + instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE customerId: "54321" - resourceName: Instance - tagName: Web-Server - resourceType: instance properties: tenantId: description: Your customer tenant id @@ -13314,323 +13702,279 @@ components: example: "54321" minLength: 1 type: string - tagId: - description: Tag's id + instanceId: + description: Instance's id example: 12345 - type: number - tagName: - description: Tag's name - example: Web-Server - maxLength: 255 - minLength: 1 - type: string - resourceType: - description: Resource type. Resource type is one of `instance|image|object-storage`. - example: instance - minLength: 1 - type: string - resourceId: - description: Resource id - example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - minLength: 1 - type: string - resourceName: - description: Resource name - example: Instance - minLength: 1 - type: string - required: - - customerId - - resourceId - - resourceName - - resourceType - - tagId - - tagName - - tenantId - type: object - ListAssignmentResponse: - example: - data: - - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - tagId: 12345 - tenantId: DE - customerId: "54321" - resourceName: Instance - tagName: Web-Server - resourceType: instance - - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - tagId: 12345 - tenantId: DE - customerId: "54321" - resourceName: Instance - tagName: Web-Server - resourceType: instance - _links: - first: /v1/tags/12345/assignments?page=1 - previous: /v1/tags/12345/assignments?page=19 - self: /v1/tags/12345/assignments/instance/23456 - next: /v1/tags/12345/assignments?page=21 - last: /v1/tags/12345/assignments?page=101 - _pagination: "" - properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. - data: - items: - $ref: '#/components/schemas/AssignmentResponse' - type: array - _links: - allOf: - - $ref: '#/components/schemas/Links' - example: - first: /v1/tags/12345/assignments?page=1 - previous: /v1/tags/12345/assignments?page=19 - self: /v1/tags/12345/assignments/instance/23456 - next: /v1/tags/12345/assignments?page=21 - last: /v1/tags/12345/assignments?page=101 - required: - - _links - - _pagination - - data - type: object - TagAssignmentSelfLinks: - properties: - self: - description: Link to current resource. - type: string - tag: - description: Link to related tag. - type: string - _resource: - description: Link to assigned resource + format: int64 + type: integer + createdDate: + description: Creation date for instance + example: 2021-06-02T12:32:03.363Z + format: date-time type: string required: - - _resource - - self - - tag + - createdDate + - customerId + - instanceId + - tenantId type: object - FindAssignmentResponse: + ReinstallInstanceResponse: example: data: - - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - tagId: 12345 + - instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE customerId: "54321" - resourceName: Instance - tagName: Web-Server - resourceType: instance - - resourceId: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc - tagId: 12345 + - instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z tenantId: DE customerId: "54321" - resourceName: Instance - tagName: Web-Server - resourceType: instance _links: - self: /v1/tags/12345/assignments/instance/23456 - tag: /v1/tags/12345 - instance: /v1/compute/instances/23456 + self: /v1/compute/instances/12345 properties: data: items: - $ref: '#/components/schemas/AssignmentResponse' + $ref: '#/components/schemas/ReinstallInstanceResponseData' type: array _links: allOf: - - $ref: '#/components/schemas/TagAssignmentSelfLinks' + - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/tags/12345/assignments/instance/23456 - tag: /v1/tags/12345 - instance: /v1/compute/instances/23456 + self: /v1/compute/instances/12345 required: - _links - data type: object - CreateAssignmentResponse: - example: - _links: - self: /v1/tags/12345/assignments/instance/6549 - tag: /v1/tags/12345 - instance: /v1/compute/instance/6549 + ExtraStorageRequest: properties: - _links: - allOf: - - $ref: '#/components/schemas/TagAssignmentSelfLinks' - description: Links for easy navigation. - example: - self: /v1/tags/12345/assignments/instance/6549 - tag: /v1/tags/12345 - instance: /v1/compute/instance/6549 + ssd: + description: Specify the size in TB and the quantity + items: + type: string + type: array + nvme: + description: Specify the size in TB and the quantity + items: + type: string + type: array + type: object + AddOnRequest: + properties: + id: + description: Id of the Addon. Please refer to list [here](https://contabo.com/en/product-list/?show_ids=true). + example: 1019 + format: int64 + type: integer + quantity: + description: The number of Addons you wish to aquire. + example: 4 + format: int64 + type: integer required: - - _links + - id + - quantity type: object - TagAuditResponse: + CreateInstanceAddons: + properties: + privateNetworking: + description: Set this attribute if you want to upgrade your instance with + the Private Networking addon. Please provide an empty object for the + time being as value. There will be more configuration possible in the + future. + example: {} + type: object + additionalIps: + description: Set this attribute if you want to upgrade your instance with + the Additional IPs addon. Please provide an empty object for the time + being as value. There will be more configuration possible in the future. + example: {} + type: object + extraStorage: + allOf: + - $ref: '#/components/schemas/ExtraStorageRequest' + description: Set this attribute if you want to upgrade your instance with + the Extra Storage addon. + example: {} + customImage: + description: Set this attribute if you want to upgrade your instance with + the Custom Images addon. Please provide an empty object for the time + being as value. There will be more configuration possible in the future. + example: {} + type: object + addonsIds: + items: + $ref: '#/components/schemas/AddOnRequest' + type: array + type: object + CreateInstanceRequest: example: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - tagId: 12345 - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - tenantId: DE - customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe + license: PleskHost + period: 6 + imageId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + userData: |- + #cloud-config + user: admin + timezone: Europe/Berlin + chpasswd: + expire: False + productId: V45 + displayName: VPS + addOns: + privateNetworking: {} + additionalIps: {} + extraStorage: {} + customImage: {} + defaultUser: root + sshKeys: '[123, 125]' + region: EU + applicationId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + rootPassword: 1 properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 + imageId: + default: afecbb85-e2fc-46f0-9684-b46b1faf00bb + description: ImageId to be used to setup the compute instance. Default is + Ubuntu 22.04 + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 type: string - customerId: - description: Your customer number - example: "54321" + productId: + default: V45 + description: Default is V45 + example: V45 minLength: 1 type: string - id: - description: The identifier of the audit entry. - example: 12345 - type: number - tagId: - description: The identifier of the audit entry. - example: 12345 - minimum: 0 - type: number - action: - description: Type of the action. + region: + default: EU + description: Instance Region where the compute instance should be located. + Default is EU enum: - - CREATED - - DELETED - - UPDATED - example: CREATED - type: string - timestamp: - description: When the change took place. - example: 2021-03-30T11:35:06.177Z - format: date-time - type: string - changedBy: - description: User ID - example: "54321" + - EU + - US-central + - US-east + - US-west + - SIN + - UK + - AUS + - JPN + example: EU minLength: 1 type: string - username: - description: Name of the user which led to the change. - example: John Doe + sshKeys: + description: Array of `secretId`s of public SSH keys for logging into as + `defaultUser` with administrator/root privileges. Applies to Linux/BSD + systems. Please refer to Secrets Management API. + example: '[123, 125]' + items: + format: int64 + type: integer + type: array + rootPassword: + description: '`secretId` of the password for the `defaultUser` with administrator/root + privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer + to Secrets Management API.' + example: 1 + format: int64 + type: integer + userData: + description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize + during start of compute instance.' + example: |- + #cloud-config + user: admin + timezone: Europe/Berlin + chpasswd: + expire: False + type: string + license: + description: Additional licence in order to enhance your chosen product, + mainly needed for software licenses on your product (not needed for windows). + enum: + - cPanel5 + - cPanel30 + - cPanel50 + - cPanel100 + - cPanel150 + - cPanel200 + - cPanel250 + - cPanel300 + - cPanel350 + - cPanel400 + - cPanel450 + - cPanel500 + - cPanel550 + - cPanel600 + - cPanel650 + - cPanel700 + - cPanel750 + - cPanel800 + - cPanel850 + - cPanel900 + - cPanel950 + - cPanel1000 + - PleskAdmin + - PleskHost + - PleskPro + example: PleskHost type: string - requestId: - description: The requestId of the API call which led to the change. - example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + period: + default: 1 + description: 'Initial contract period in months. Available periods are: + 1, 3, 6 and 12 months. Default to 1 month' + example: 6 + format: int64 + type: integer + displayName: + description: The display name of the instance + example: VPS + maxLength: 255 type: string - traceId: - description: The traceId of the API call which led to the change. - example: 78E9A428-94E9-4A2A-92F5-26038C6884F + defaultUser: + default: admin + description: Default user name created for login during (re-)installation + with administrative privileges. Allowed values for Linux/BSD are `admin` + (use sudo to apply administrative privileges like root) or `root`. Allowed + values for Windows are `admin` (has administrative privileges like administrator) + or `administrator`. + enum: + - root + - admin + - administrator + example: root type: string - changes: - description: List of actual changes. - example: - prev: - name: test - new: - name: test1 - type: object - required: - - action - - changedBy - - customerId - - id - - requestId - - tagId - - tenantId - - timestamp - - traceId - - username - type: object - ListTagAuditsResponse: - example: - data: - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - tagId: 12345 - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - tenantId: DE - customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - tagId: 12345 - changedBy: "54321" - requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - tenantId: DE - customerId: "54321" - changes: - prev: - name: test - new: - name: test1 - action: CREATED - id: 12345 - timestamp: 2021-03-30T11:35:06.177Z - username: John Doe - _links: - first: /v1/tags/audits?page=1 - previous: /v1/tags/audits?page=19 - self: /v1/tags/audits?page=20 - next: /v1/tags/audits?page=21 - last: /v1/tags/audits?page=101 - _pagination: "" - properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. - data: - items: - $ref: '#/components/schemas/TagAuditResponse' - type: array - _links: + addOns: allOf: - - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/CreateInstanceAddons' + description: Set attributes in the addons object for the corresponding ones + that need to be added to the instance example: - first: /v1/tags/audits?page=1 - previous: /v1/tags/audits?page=19 - self: /v1/tags/audits?page=20 - next: /v1/tags/audits?page=21 - last: /v1/tags/audits?page=101 + privateNetworking: {} + additionalIps: {} + extraStorage: {} + customImage: {} + applicationId: + description: Application ID + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + type: string required: - - _links - - _pagination - - data + - period type: object - AssignmentAuditResponse: + CreateInstanceResponseData: example: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F5 - resourceId: a1b2c3 - tagId: 12345 - changes: '{}' - changedBy: "54321" - requestId: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 + instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V45 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 tenantId: DE customerId: "54321" - action: CREATED | DELETED - id: 12345 - resourceType: instance - timestamp: 2000-01-23T04:56:07.000+00:00 - username: John Doe + osType: Linux + sshKeys: + - 123 + - 125 + region: EU properties: tenantId: description: Your customer tenant id @@ -13642,221 +13986,120 @@ components: example: "54321" minLength: 1 type: string - id: - description: The identifier of the audit entry. - example: 12345 - type: number - resourceId: - description: Resource's id - example: a1b2c3 - type: string - resourceType: - description: Resource type. Resource type is one of `instance|image|object-storage`. - example: instance - type: string - tagId: - description: Tag's id + instanceId: + description: Instance's id example: 12345 - minimum: 0 - type: number - action: - description: Audit Action - enum: - - CREATED - - DELETED - example: CREATED | DELETED - type: string - timestamp: - description: Audit creation date + format: int64 + type: integer + createdDate: + description: Creation date for instance + example: 2021-06-02T12:32:03.363Z format: date-time type: string - changedBy: - description: User ID - example: "54321" - minLength: 1 + imageId: + description: Image's id + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d type: string - username: - description: User Full Name - example: John Doe + productId: + description: Product ID + example: V45 type: string - requestId: - description: Request ID - example: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 + region: + description: Instance Region where the compute instance should be located. + example: EU type: string - traceId: - description: Trace ID - example: 78E9A428-94E9-4A2A-92F5-26038C6884F5 + addOns: + items: + $ref: '#/components/schemas/AddOnResponse' + type: array + osType: + description: Type of operating system (OS) + example: Linux type: string - changes: - description: Changes made for a specific Tag - type: object + status: + $ref: '#/components/schemas/instanceStatus' + sshKeys: + description: Array of `secretId`s of public SSH keys for logging into as + `defaultUser` with administrator/root privileges. Applies to Linux/BSD + systems. Please refer to Secrets Management API. + example: + - 123 + - 125 + items: + format: int64 + type: integer + type: array required: - - action - - changedBy + - addOns + - createdDate - customerId - - id - - requestId - - resourceId - - resourceType - - tagId - - tenantId - - timestamp - - traceId - - username - type: object - ListAssignmentAuditsResponse: - example: - data: - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F5 - resourceId: a1b2c3 - tagId: 12345 - changes: '{}' - changedBy: "54321" - requestId: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 + - imageId + - instanceId + - osType + - productId + - region + - sshKeys + - status + - tenantId + type: object + CreateInstanceResponse: + example: + data: + - instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V45 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 tenantId: DE customerId: "54321" - action: CREATED | DELETED - id: 12345 - resourceType: instance - timestamp: 2000-01-23T04:56:07.000+00:00 - username: John Doe - - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F5 - resourceId: a1b2c3 - tagId: 12345 - changes: '{}' - changedBy: "54321" - requestId: 04E0F898-37B4-48BC-A794-1A57ABE6AA31 + osType: Linux + sshKeys: + - 123 + - 125 + region: EU + - instanceId: 12345 + createdDate: 2021-06-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + productId: V45 + addOns: + - quantity: 4 + id: 1431 + - quantity: 4 + id: 1431 tenantId: DE customerId: "54321" - action: CREATED | DELETED - id: 12345 - resourceType: instance - timestamp: 2000-01-23T04:56:07.000+00:00 - username: John Doe + osType: Linux + sshKeys: + - 123 + - 125 + region: EU _links: - first: /v1/tags/assignments/audits?page=1 - previous: /v1/tags/assignments/audits?page=19 - self: /v1/tags/assignments/audits?page=20 - next: /v1/tags/assignments/audits?page=21 - last: /v1/tags/assignments/audits?page=101 - _pagination: "" + self: /v1/compute/instances/12345 properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/AssignmentAuditResponse' + $ref: '#/components/schemas/CreateInstanceResponseData' type: array _links: allOf: - - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/SelfLinks' example: - first: /v1/tags/assignments/audits?page=1 - previous: /v1/tags/assignments/audits?page=19 - self: /v1/tags/assignments/audits?page=20 - next: /v1/tags/assignments/audits?page=21 - last: /v1/tags/assignments/audits?page=101 + self: /v1/compute/instances/12345 required: - _links - - _pagination - data type: object - ResourcePermissionsResponse: - example: - tagId: 12345 - tagName: Web - properties: - tagId: - description: Tag's id - example: 12345 - format: int64 - type: integer - tagName: - description: Tag name. The resriction is based on the resources which have - been assigned to that tag. If no resource has been assigned to the given - tag, no access will be possible. - example: Web - type: string - required: - - tagId - - tagName - type: object - PermissionResponse: - example: - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - properties: - apiName: - description: API endpoint. In order to get a list availbale api enpoints - please refer to the GET api-permissions endpoint. - example: /v1/compute/instances - type: string - actions: - description: Action allowed for the API endpoint. Basically `CREATE` corresponds - to POST endpoints, `READ` to GET endpoints, `UPDATE` to PATCH / PUT endpoints - and `DELETE` to DELETE endpoints. - example: - - CREATE - - READ - items: - enum: - - CREATE - - READ - - UPDATE - - DELETE - type: string - type: array - resources: - items: - $ref: '#/components/schemas/ResourcePermissionsResponse' - type: array - required: - - actions - - apiName - type: object - RoleResponse: + CancelInstanceResponseData: example: - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true + cancelDate: 2021-06-03T00:00:00.000+0000 + instanceId: 12345 tenantId: DE customerId: "54321" - name: infrastructure - admin: true - type: custom properties: - roleId: - description: Role's id - example: 12345 - format: int64 - type: integer tenantId: description: Your customer tenant id example: DE @@ -13867,325 +14110,212 @@ components: example: "54321" minLength: 1 type: string - name: - description: Role's name - example: infrastructure - type: string - admin: - description: Admin - example: true - type: boolean - accessAllResources: - description: Access All Resources - example: true - type: boolean - type: - description: Role type can be either `default` or `custom`. The `default` - roles cannot be modified or deleted. - example: custom + instanceId: + description: Instance's id + example: 12345 + format: int64 + type: integer + cancelDate: + description: The date on which the instance will be cancelled + example: 2021-06-03 + format: date type: string - permissions: - items: - $ref: '#/components/schemas/PermissionResponse' - type: array required: - - accessAllResources - - admin + - cancelDate - customerId - - name - - roleId + - instanceId - tenantId - - type type: object - UserResponse: + CancelInstanceResponse: example: - owner: false - firstName: John - lastName: Doe - emailVerified: false - totp: false - roles: - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true + data: + - cancelDate: 2021-06-03T00:00:00.000+0000 + instanceId: 12345 tenantId: DE customerId: "54321" - name: infrastructure - admin: true - type: custom + - cancelDate: 2021-06-03T00:00:00.000+0000 + instanceId: 12345 + tenantId: DE + customerId: "54321" + _links: + self: /v1/compute/instances/12345 + properties: + data: + items: + $ref: '#/components/schemas/CancelInstanceResponseData' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/compute/instances/12345 + required: + - _links + - data + type: object + FirewallingUpgradeRequest: + properties: + assignFirewalls: + description: List of IDs of firewalls the upgraded instance should be assigned + to immediately. If the list is empty or this property is not provided + the instance will be assigned to your current default firewall. + items: + type: string + type: array + type: object + PrivateNetworkingUpgradeRequest: + properties: {} + type: object + AddOnQuantityRequest: + properties: + quantity: + description: The number of Addons you wish to aquire. + example: 4 + format: int64 + type: integer + required: + - quantity + type: object + UpgradeInstanceRequest: + example: + privateNetworking: {} + properties: + privateNetworking: + allOf: + - $ref: '#/components/schemas/PrivateNetworkingUpgradeRequest' + description: Set this attribute if you want to upgrade your instance with + the Private Networking addon. Please provide an empty object for the time + being as value. There will be more configuration possible in the future. + example: {} + type: object + InstancesActionsAuditResponse: + example: + traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + instanceId: 12345 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" - locale: de - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - email: john.doe@example.com - enabled: false + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe properties: + id: + description: The ID of the audit entry. + example: 12345 + format: int64 + type: integer + action: + description: Type of the action. + enum: + - CREATED + - UPDATED + - DELETED + example: CREATED + type: string + timestamp: + description: When the change took place. + example: 2021-03-30T11:35:06.177Z + format: date-time + type: string tenantId: - description: Your customer tenant id + description: Customer tenant id example: DE minLength: 1 type: string customerId: - description: Your customer number + description: Customer ID example: "54321" minLength: 1 type: string - userId: - description: The identifier of the user. - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - type: string - firstName: - description: The first name of the user. Users may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - user. - example: John - maxLength: 255 + changedBy: + description: Id of user who performed the change + example: c4c800ff-e524-47dd-9543-71dfc8b91113 minLength: 1 type: string - lastName: - description: The last name of the user. Users may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - user. - example: Doe - maxLength: 255 - minLength: 1 + username: + description: Name of the user which led to the change. + example: John.Doe type: string - email: - description: The email of the user to which activation and forgot password - links are being sent to. There is a limit of 255 characters per email. - example: john.doe@example.com - maxLength: 255 - minLength: 1 + requestId: + description: The requestId of the API call which led to the change. + example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 type: string - emailVerified: - description: User email verification status. - example: false - type: boolean - enabled: - description: If uses is not enabled, he can't login and thus use services - any longer. - example: false - type: boolean - totp: - description: Enable or disable two-factor authentication (2FA) via time - based OTP. - example: false - type: boolean - locale: - description: The locale of the user. This can be `de-DE`, `de`, `en-US`, - `en` - enum: - - de-DE - - de - - en-US - - en - example: de + traceId: + description: The traceId of the API call which led to the change. + example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - roles: - description: The roles as list of `roleId`s of the user. - items: - $ref: '#/components/schemas/RoleResponse' - type: array - owner: - description: If user is owner he will have permissions to all API endpoints - and resources. Enabling this will superseed all role definitions and `accessAllResources`. - example: false - type: boolean - required: - - customerId - - email - - emailVerified - - enabled - - firstName - - lastName - - locale - - owner - - roles - - tenantId - - totp - - userId - type: object - ListUserResponse: - example: - data: - - owner: false - firstName: John - lastName: Doe - emailVerified: false - totp: false - roles: - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom + instanceId: + description: The identifier of the instancesActions + example: 12345 + format: int64 + minimum: 0 + type: integer + changes: + description: List of actual changes. + example: + prev: + name: test + new: + name: test1 + type: object + required: + - action + - changedBy + - customerId + - id + - instanceId + - requestId + - tenantId + - timestamp + - traceId + - username + type: object + ListInstancesActionsAuditResponse: + example: + data: + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + instanceId: 12345 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" - locale: de - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - email: john.doe@example.com - enabled: false - - owner: false - firstName: John - lastName: Doe - emailVerified: false - totp: false - roles: - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + instanceId: 12345 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" - locale: de - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - email: john.doe@example.com - enabled: false + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe _links: - first: /v1/users?page=1 - next: /v1/users?page=19 - self: /v1/users/12345 - previous: /v1/users?page=21 - last: /v1/users?page=101 + first: /v1/compute/instances/actions/audits?page=2 + previous: /v1/compute/instances/actions/audits?page=2 + next: /v1/compute/instances/actions/audits?page=3 + last: /v1/compute/instances/actions/audits?page=10 + self: /v1/compute/instances/actions/audits _pagination: "" properties: _pagination: @@ -14194,445 +14324,680 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/UserResponse' + $ref: '#/components/schemas/InstancesActionsAuditResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/users?page=1 - next: /v1/users?page=19 - self: /v1/users/12345 - previous: /v1/users?page=21 - last: /v1/users?page=101 + first: /v1/compute/instances/actions/audits?page=2 + previous: /v1/compute/instances/actions/audits?page=2 + next: /v1/compute/instances/actions/audits?page=3 + last: /v1/compute/instances/actions/audits?page=10 + self: /v1/compute/instances/actions/audits required: - _links - _pagination - data type: object - CreateUserRequest: - example: - firstName: John - lastName: Doe - totp: false - roles: - - 1 - - 2 - - 3 - - 4 - locale: de - email: john.doe@example.com - enabled: false - properties: - firstName: - description: The name of the user. Names may contain letters, numbers, colons, - dashes, and underscores. There is a limit of 255 characters per user. - example: John - maxLength: 255 - minLength: 1 - type: string - lastName: - description: The last name of the user. Users may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - user. - example: Doe - maxLength: 255 - minLength: 1 - type: string - email: - description: The email of the user to which activation and forgot password - links are being sent to. There is a limit of 255 characters per email. - example: john.doe@example.com - maxLength: 255 - minLength: 1 - type: string - enabled: - description: If user is not enabled, he can't login and thus use services - any longer. - example: false - type: boolean - totp: - description: Enable or disable two-factor authentication (2FA) via time - based OTP. - example: false - type: boolean - locale: - description: The locale of the user. This can be `de-DE`, `de`, `en-US`, - `en` - enum: - - de-DE - - de - - en-US - - en - example: de - type: string - roles: - description: The roles as list of `roleId`s of the user. - example: - - 1 - - 2 - - 3 - - 4 - items: - format: int64 - type: integer - type: array - required: - - email - - enabled - - locale - - totp - type: object - CreateUserResponseData: + InstancesAuditResponse: example: + traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + instanceId: 12345 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe properties: + id: + description: The ID of the audit entry. + example: 12345 + format: int64 + type: integer + action: + description: Type of the action. + enum: + - CREATED + - UPDATED + - DELETED + example: CREATED + type: string + timestamp: + description: When the change took place. + example: 2021-03-30T11:35:06.177Z + format: date-time + type: string tenantId: - description: Your customer tenant id + description: Customer tenant id example: DE minLength: 1 type: string customerId: - description: Your customer number + description: Customer ID example: "54321" minLength: 1 type: string - userId: - description: User's id - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + changedBy: + description: Id of user who performed the change + example: c4c800ff-e524-47dd-9543-71dfc8b91113 + minLength: 1 + type: string + username: + description: Name of the user which led to the change. + example: John.Doe + type: string + requestId: + description: The requestId of the API call which led to the change. + example: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + type: string + traceId: + description: The traceId of the API call which led to the change. + example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string + instanceId: + description: The identifier of the instance + example: 12345 + format: int64 + minimum: 0 + type: integer + changes: + description: List of actual changes. + example: + prev: + name: test + new: + name: test1 + type: object required: + - action + - changedBy - customerId + - id + - instanceId + - requestId - tenantId - - userId + - timestamp + - traceId + - username type: object - CreateUserResponse: + ListInstancesAuditResponse: example: data: - - tenantId: DE + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + instanceId: 12345 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + tenantId: DE customerId: "54321" - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - - tenantId: DE + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe + - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F + instanceId: 12345 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 + requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 + tenantId: DE customerId: "54321" - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + changes: + prev: + name: test + new: + name: test1 + action: CREATED + id: 12345 + timestamp: 2021-03-30T11:35:06.177Z + username: John.Doe _links: - self: /v1/users/12345 + first: /v1/compute/instances/audits?page=2 + previous: /v1/compute/instances/audits?page=2 + next: /v1/compute/instances/audits?page=3 + last: /v1/compute/instances/audits?page=10 + self: /v1/compute/instances/audits + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/CreateUserResponseData' + $ref: '#/components/schemas/InstancesAuditResponse' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/users/12345 + first: /v1/compute/instances/audits?page=2 + previous: /v1/compute/instances/audits?page=2 + next: /v1/compute/instances/audits?page=3 + last: /v1/compute/instances/audits?page=10 + self: /v1/compute/instances/audits required: - _links + - _pagination - data type: object - FindUserResponse: + TagResponse1: example: - data: - - owner: false - firstName: John - lastName: Doe - emailVerified: false - totp: false - roles: - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom + tagId: 12345 + tagName: Web-Server + properties: + tagId: + description: Tag's id + example: 12345 + type: number + tagName: + description: Tag's name + example: Web-Server + maxLength: 255 + minLength: 1 + type: string + required: + - tagId + - tagName + type: object + ListImageResponseData: + example: + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + lastModifiedDate: 2021-06-04T06:27:12Z + format: iso + errorMessage: Error downloading image from provided URL + description: Ubuntu Server 20.04.2 LTS + sizeMb: 1024 + creationDate: 2021-06-03T06:27:12Z + version: 20.04.2 + url: https://example.com/image.qcow2 + tags: + - tagId: 12345 + tagName: Web-Server + - tagId: 12345 + tagName: Web-Server + uploadedSizeMb: 1024 + tenantId: DE + customerId: "12345" + name: Custom Image Ubuntu + osType: Linux + status: Pending + standardImage: true + properties: + imageId: + description: Image's id + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string + tenantId: + description: Your customer tenant id + enum: + - DE + - INT + example: DE + minLength: 1 + type: string + customerId: + description: Customer ID + example: "12345" + minLength: 1 + type: string + name: + description: Image Name + example: Custom Image Ubuntu + type: string + description: + description: Image Description + example: Ubuntu Server 20.04.2 LTS + type: string + url: + description: URL from where the image has been downloaded / provided. + example: https://example.com/image.qcow2 + type: string + sizeMb: + description: Image Size in MB + example: 1024 + type: number + uploadedSizeMb: + description: Image Uploaded Size in MB + example: 1024 + type: number + osType: + description: Type of operating system (OS) + example: Linux + type: string + version: + description: Version number to distinguish the contents of an image. Could + be the version of the operating system for example. + example: 20.04.2 + type: string + format: + description: Image format + enum: + - iso + - qcow2 + example: iso + type: string + status: + description: Image status (e.g. if image is still downloading) + example: Pending + type: string + errorMessage: + description: Image download error message + example: Error downloading image from provided URL + type: string + standardImage: + description: Flag indicating that image is either a standard (true) or a + custom image (false) + example: true + type: boolean + creationDate: + description: The creation date time for the image + example: 2021-06-03T06:27:12Z + format: date-time + type: string + lastModifiedDate: + description: The last modified date time for the image + example: 2021-06-04T06:27:12Z + format: date-time + type: string + tags: + description: The tags assigned to the image + items: + $ref: '#/components/schemas/TagResponse1' + type: array + required: + - creationDate + - customerId + - description + - errorMessage + - format + - imageId + - lastModifiedDate + - name + - osType + - sizeMb + - standardImage + - status + - tags + - tenantId + - uploadedSizeMb + - url + - version + type: object + ListImageResponse: + example: + data: + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + lastModifiedDate: 2021-06-04T06:27:12Z + format: iso + errorMessage: Error downloading image from provided URL + description: Ubuntu Server 20.04.2 LTS + sizeMb: 1024 + creationDate: 2021-06-03T06:27:12Z + version: 20.04.2 + url: https://example.com/image.qcow2 + tags: + - tagId: 12345 + tagName: Web-Server + - tagId: 12345 + tagName: Web-Server + uploadedSizeMb: 1024 tenantId: DE - customerId: "54321" - locale: de - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - email: john.doe@example.com - enabled: false - - owner: false - firstName: John - lastName: Doe - emailVerified: false - totp: false - roles: - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true - tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom + customerId: "12345" + name: Custom Image Ubuntu + osType: Linux + status: Pending + standardImage: true + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + lastModifiedDate: 2021-06-04T06:27:12Z + format: iso + errorMessage: Error downloading image from provided URL + description: Ubuntu Server 20.04.2 LTS + sizeMb: 1024 + creationDate: 2021-06-03T06:27:12Z + version: 20.04.2 + url: https://example.com/image.qcow2 + tags: + - tagId: 12345 + tagName: Web-Server + - tagId: 12345 + tagName: Web-Server + uploadedSizeMb: 1024 tenantId: DE - customerId: "54321" - locale: de - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - email: john.doe@example.com - enabled: false + customerId: "12345" + name: Custom Image Ubuntu + osType: Linux + status: Pending + standardImage: true _links: - self: /v1/users/12345 + first: /v1/compute/images?page=1 + previous: /v1/compute/images?page=19 + self: /v1/compute/images?page=20 + next: /v1/compute/images?page=21 + last: /v1/compute/images?page=101 + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/UserResponse' + $ref: '#/components/schemas/ListImageResponseData' type: array _links: allOf: - - $ref: '#/components/schemas/SelfLinks' + - $ref: '#/components/schemas/Links' example: - self: /v1/users/12345 + first: /v1/compute/images?page=1 + previous: /v1/compute/images?page=19 + self: /v1/compute/images?page=20 + next: /v1/compute/images?page=21 + last: /v1/compute/images?page=101 required: - _links + - _pagination - data type: object - UpdateUserRequest: + CreateCustomImageRequest: example: - firstName: John - lastName: Doe - totp: false - roles: - - 1 - - 2 - - 3 - - 4 - locale: de - email: john.doe@example.com - enabled: false + name: Ubuntu Custom Image + osType: Linux + description: Ubuntu Server 20.04.2 LTS + version: 20.04.2 + url: https://example.com/image.qcow2 properties: - firstName: - description: The name of the user. Names may contain letters, numbers, colons, - dashes, and underscores. There is a limit of 255 characters per user. - example: John - maxLength: 255 - minLength: 1 + name: + description: Image Name + example: Ubuntu Custom Image type: string - lastName: - description: The last name of the user. Users may contain letters, numbers, - colons, dashes, and underscores. There is a limit of 255 characters per - user. - example: Doe - maxLength: 255 - minLength: 1 + description: + description: Image Description + example: Ubuntu Server 20.04.2 LTS type: string - email: - description: The email of the user to which activation and forgot password - links are being sent to. There is a limit of 255 characters per email. - example: john.doe@example.com - maxLength: 255 - minLength: 1 + url: + description: URL from where the image has been downloaded / provided. + example: https://example.com/image.qcow2 type: string - enabled: - description: If user is not enabled, he can't login and thus use services - any longer. - example: false - type: boolean - totp: - description: Enable or disable two-factor authentication (2FA) via time - based OTP. - example: false - type: boolean - locale: - description: The locale of the user. This can be `de-DE`, `de`, `en-US`, - `en` + osType: + description: Provided type of operating system (OS). Please specify `Windows` + for MS Windows and `Linux` for other OS. Specifying wrong OS type may + lead to disfunctional cloud instance. enum: - - de-DE - - de - - en-US - - en - example: de + - Windows + - Linux + example: Linux + type: string + version: + description: Version number to distinguish the contents of an image. Could + be the version of the operating system for example. + example: 20.04.2 + type: string + required: + - name + - osType + - url + - version + type: object + CreateCustomImageResponseData: + example: + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + tenantId: DE + customerId: "54321" + properties: + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your customer number + example: "54321" + minLength: 1 type: string - roles: - description: The roles as list of `roleId`s of the user. - example: - - 1 - - 2 - - 3 - - 4 - items: - format: int64 - type: integer - type: array + imageId: + description: Image's id + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string + required: + - customerId + - imageId + - tenantId type: object - UpdateUserResponse: + CreateCustomImageResponse: example: + data: + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + tenantId: DE + customerId: "54321" + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + tenantId: DE + customerId: "54321" _links: - self: /v1/users/12345 + self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d properties: + data: + items: + $ref: '#/components/schemas/CreateCustomImageResponseData' + type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' - description: Links for easy navigation. example: - self: /v1/users/12345 + self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d required: - _links + - data type: object - ClientResponse: + CreateCustomImageFailResponse: + properties: + message: + description: 'Unsupported Media Type: Please provide a direct link to an + .iso or .qcow2 image.' + example: Unsupported Media Type + type: string + statusCode: + description: statuscode:415 + example: 415 + type: integer + required: + - message + - statusCode + type: object + ImageResponse: example: - clientId: DE-54321 + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + lastModifiedDate: 2021-06-04T06:27:12Z + format: iso + errorMessage: Error downloading image from provided URL + description: Ubuntu Server 20.04.2 LTS + sizeMb: 1024 + creationDate: 2021-06-03T06:27:12Z + version: 20.04.2 + url: https://example.com/image.qcow2 + uploadedSizeMb: 1024 tenantId: DE - customerId: "54321" - id: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - secret: 7271e905-239e-4d15-a8c5-527743a58390 + customerId: "12345" + name: Custom Image Ubuntu + osType: Linux + status: Pending + standardImage: true properties: + imageId: + description: Image's id + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string tenantId: description: Your customer tenant id + enum: + - DE + - INT example: DE minLength: 1 type: string customerId: - description: Your customer number - example: "54321" + description: Customer ID + example: "12345" minLength: 1 type: string - id: - description: Client's id - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + name: + description: Image Name + example: Custom Image Ubuntu type: string - clientId: - description: IDM client id - example: DE-54321 + description: + description: Image Description + example: Ubuntu Server 20.04.2 LTS type: string - secret: - description: IDM client secret - example: 7271e905-239e-4d15-a8c5-527743a58390 + url: + description: URL from where the image has been downloaded / provided. + example: https://example.com/image.qcow2 + type: string + sizeMb: + description: Image Size in MB + example: 1024 + type: number + uploadedSizeMb: + description: Image Uploaded Size in MB + example: 1024 + type: number + osType: + description: Type of operating system (OS) + example: Linux + type: string + version: + description: Version number to distinguish the contents of an image. Could + be the version of the operating system for example. + example: 20.04.2 + type: string + format: + description: Image format + enum: + - iso + - qcow2 + example: iso + type: string + status: + description: Image status (e.g. if image is still downloading) + example: Pending + type: string + errorMessage: + description: Image download error message + example: Error downloading image from provided URL + type: string + standardImage: + description: Flag indicating that image is either a standard (true) or a + custom image (false) + example: true + type: boolean + creationDate: + description: The creation date time for the image + example: 2021-06-03T06:27:12Z + format: date-time + type: string + lastModifiedDate: + description: The last modified date time for the image + example: 2021-06-04T06:27:12Z + format: date-time type: string required: - - clientId + - creationDate - customerId - - id - - secret + - description + - errorMessage + - format + - imageId + - lastModifiedDate + - name + - osType + - sizeMb + - standardImage + - status - tenantId + - uploadedSizeMb + - url + - version type: object - FindClientResponse: + FindImageResponse: example: data: - - clientId: DE-54321 + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + lastModifiedDate: 2021-06-04T06:27:12Z + format: iso + errorMessage: Error downloading image from provided URL + description: Ubuntu Server 20.04.2 LTS + sizeMb: 1024 + creationDate: 2021-06-03T06:27:12Z + version: 20.04.2 + url: https://example.com/image.qcow2 + uploadedSizeMb: 1024 tenantId: DE - customerId: "54321" - id: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - secret: 7271e905-239e-4d15-a8c5-527743a58390 - - clientId: DE-54321 + customerId: "12345" + name: Custom Image Ubuntu + osType: Linux + status: Pending + standardImage: true + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + lastModifiedDate: 2021-06-04T06:27:12Z + format: iso + errorMessage: Error downloading image from provided URL + description: Ubuntu Server 20.04.2 LTS + sizeMb: 1024 + creationDate: 2021-06-03T06:27:12Z + version: 20.04.2 + url: https://example.com/image.qcow2 + uploadedSizeMb: 1024 tenantId: DE - customerId: "54321" - id: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 - secret: 7271e905-239e-4d15-a8c5-527743a58390 + customerId: "12345" + name: Custom Image Ubuntu + osType: Linux + status: Pending + standardImage: true _links: - self: /v1/users/client + self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d properties: data: items: - $ref: '#/components/schemas/ClientResponse' + $ref: '#/components/schemas/ImageResponse' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/users/client + self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d required: - _links - data type: object - ClientSecretResponse: + UpdateCustomImageRequest: + example: + name: Ubuntu Custom Image + description: Ubuntu 20.04 image + properties: + name: + description: Image Name + example: Ubuntu Custom Image + type: string + description: + description: Image Description + example: Ubuntu 20.04 image + type: string + type: object + UpdateCustomImageResponseData: example: + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d tenantId: DE customerId: "54321" - secret: 7271e905-239e-4d15-a8c5-527743a58390 properties: tenantId: description: Your customer tenant id @@ -14644,45 +15009,48 @@ components: example: "54321" minLength: 1 type: string - secret: - description: IDM client secret - example: 7271e905-239e-4d15-a8c5-527743a58390 + imageId: + description: Image's id + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d type: string required: - customerId - - secret + - imageId - tenantId type: object - GenerateClientSecretResponse: + UpdateCustomImageResponse: example: data: - - tenantId: DE + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + tenantId: DE customerId: "54321" - secret: 7271e905-239e-4d15-a8c5-527743a58390 - - tenantId: DE + - imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + tenantId: DE customerId: "54321" - secret: 7271e905-239e-4d15-a8c5-527743a58390 _links: - self: /v1/users/client/secret + self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d properties: data: items: - $ref: '#/components/schemas/ClientSecretResponse' + $ref: '#/components/schemas/UpdateCustomImageResponseData' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/users/client/secret + self: /v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d required: - _links - data type: object - UserIsPasswordSetResponse: + CustomImagesStatsResponseData: example: + currentImagesCount: 4 + usedSizeMb: 55000 tenantId: DE customerId: "54321" - isPasswordSet: false + freeSizeMb: 47400 + totalSizeMb: 102400 properties: tenantId: description: Your customer tenant id @@ -14694,554 +15062,486 @@ components: example: "54321" minLength: 1 type: string - isPasswordSet: - description: Indicates if the user has set a password for his account - example: false - type: boolean + currentImagesCount: + description: The number of existing custom images + example: 4 + type: number + totalSizeMb: + description: Total available disk space in MB + example: 102400 + type: number + usedSizeMb: + description: Used disk space in MB + example: 55000 + type: number + freeSizeMb: + description: Free disk space in MB + example: 47400 + type: number required: + - currentImagesCount - customerId - - isPasswordSet + - freeSizeMb - tenantId + - totalSizeMb + - usedSizeMb type: object - FindUserIsPasswordSetResponse: - example: - data: - - tenantId: DE - customerId: "54321" - isPasswordSet: false - - tenantId: DE - customerId: "54321" - isPasswordSet: false - _links: - self: /v1/users/is-password-set - properties: - data: - items: - $ref: '#/components/schemas/UserIsPasswordSetResponse' - type: array - _links: - allOf: - - $ref: '#/components/schemas/SelfLinks' - example: - self: /v1/users/is-password-set - required: - - _links - - data - type: object - ListRoleResponse: + CustomImagesStatsResponse: example: data: - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true + - currentImagesCount: 4 + usedSizeMb: 55000 tenantId: DE customerId: "54321" - name: infrastructure - admin: true - type: custom - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true + freeSizeMb: 47400 + totalSizeMb: 102400 + - currentImagesCount: 4 + usedSizeMb: 55000 tenantId: DE customerId: "54321" - name: infrastructure - admin: true - type: custom + freeSizeMb: 47400 + totalSizeMb: 102400 _links: - first: /v1/role/{roleType}/?page=1 - next: /v1/role/{roleType}/?page=19 - self: /v1/role/{roleType}/12345 - previous: /v1/role/{roleType}/?page=21 - last: /v1/role/{roleType}?page=101 - _pagination: "" + self: /v1/compute/images/stats properties: - _pagination: - allOf: - - $ref: '#/components/schemas/PaginationMeta' - description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/RoleResponse' + $ref: '#/components/schemas/CustomImagesStatsResponseData' type: array _links: allOf: - - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/SelfLinks' example: - first: /v1/role/{roleType}/?page=1 - next: /v1/role/{roleType}/?page=19 - self: /v1/role/{roleType}/12345 - previous: /v1/role/{roleType}/?page=21 - last: /v1/role/{roleType}?page=101 + self: /v1/compute/images/stats required: - _links - - _pagination - data type: object - PermissionRequest: + SnapshotResponse: example: - apiName: infrastructure - resources: - - 1 - - 2 - - 3 - actions: - - CREATE - - READ + snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 + tenantId: DE + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description properties: - apiName: - description: The name of the role. There is a limit of 255 characters per - role. - example: infrastructure + tenantId: + description: Your customer tenant id + example: DE + minLength: 1 + type: string + customerId: + description: Your customer number + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + minLength: 1 + type: string + snapshotId: + description: Snapshot's id + example: snap1628603855 + type: string + name: + description: The name of the snapshot. + example: Snapshot-Server maxLength: 255 minLength: 1 type: string - actions: - description: Action allowed for the API endpoint. Basically `CREATE` corresponds - to POST endpoints, `READ` to GET endpoints, `UPDATE` to PATCH / PUT endpoints - and `DELETE` to DELETE endpoints. - example: - - CREATE - - READ + description: + description: The description of the snapshot. + example: Snapshot-Description + maxLength: 255 + minLength: 1 + type: string + instanceId: + description: The instance identifier associated with the snapshot + example: 1234 + format: int64 + type: integer + createdDate: + description: The date when the snapshot was created + example: 2021-06-02T12:32:03.363Z + format: date-time + type: string + autoDeleteDate: + description: The date when the snapshot will be auto-deleted + example: 2021-07-02T12:32:03.363Z + format: date-time + type: string + imageId: + description: Image Id the snapshot was taken on + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string + imageName: + description: Image name the snapshot was taken on + example: ubuntu-18.04 + type: string + required: + - autoDeleteDate + - createdDate + - customerId + - description + - imageId + - imageName + - instanceId + - name + - snapshotId + - tenantId + type: object + ListSnapshotResponse: + example: + data: + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 + tenantId: DE + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 + tenantId: DE + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description + _links: + first: /v1/compute/instances/12345/snapshots?page=1 + next: /v1/compute/instances/12345/snapshots?page=19 + self: /v1/compute/instances/12345/snapshots/snap1628603855 + previous: /v1/compute/instances/12345/snapshots?page=21 + last: /v1/compute/instances/12345/snapshots?page=101 + _pagination: "" + properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. + data: items: - enum: - - CREATE - - READ - - UPDATE - - DELETE - type: string + $ref: '#/components/schemas/SnapshotResponse' type: array - resources: - description: The IDs of tags. Only if those tags are assgined to a resource - the user with that role will be able to access the resource. + _links: + allOf: + - $ref: '#/components/schemas/Links' example: - - 1 - - 2 - - 3 - items: - format: int64 - type: integer - type: array + first: /v1/compute/instances/12345/snapshots?page=1 + next: /v1/compute/instances/12345/snapshots?page=19 + self: /v1/compute/instances/12345/snapshots/snap1628603855 + previous: /v1/compute/instances/12345/snapshots?page=21 + last: /v1/compute/instances/12345/snapshots?page=101 required: - - actions - - apiName + - _links + - _pagination + - data type: object - CreateRoleRequest: + CreateSnapshotRequest: example: - permissions: - - apiName: infrastructure - resources: - - 1 - - 2 - - 3 - actions: - - CREATE - - READ - - apiName: infrastructure - resources: - - 1 - - 2 - - 3 - actions: - - CREATE - - READ - accessAllResources: false - name: infrastructure - admin: false + name: Snapshot-Server + description: Snapshot-Description properties: name: - description: The name of the role. There is a limit of 255 characters per - role. - example: infrastructure + description: The name of the snapshot. It may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + snapshot. + example: Snapshot-Server + maxLength: 255 + minLength: 1 + type: string + description: + description: The description of the snapshot. There is a limit of 255 characters + per snapshot. + example: Snapshot-Description maxLength: 255 minLength: 1 type: string - admin: - description: If user is admin he will have permissions to all API endpoints - and resources. Enabling this will superseed all role definitions and `accessAllResources`. - example: false - type: boolean - accessAllResources: - description: Allow access to all resources. This will superseed all assigned - resources in a role. - example: false - type: boolean - permissions: - items: - $ref: '#/components/schemas/PermissionRequest' - type: array required: - - accessAllResources - - admin - name type: object - CreateRoleResponseData: + CreateSnapshotResponse: example: - roleId: 12345 - tenantId: DE - customerId: "54321" + data: + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 + tenantId: DE + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 + tenantId: DE + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description + _links: + self: /v1/compute/instances/12345/snapshots/snap1628603855 properties: - tenantId: - description: Your customer tenant id - example: DE - minLength: 1 - type: string - customerId: - description: Your customer number - example: "54321" - minLength: 1 - type: string - roleId: - description: Role's id - example: 12345 - format: int64 - type: integer + data: + items: + $ref: '#/components/schemas/SnapshotResponse' + type: array + _links: + allOf: + - $ref: '#/components/schemas/SelfLinks' + example: + self: /v1/compute/instances/12345/snapshots/snap1628603855 required: - - customerId - - roleId - - tenantId + - _links + - data type: object - CreateRoleResponse: + FindSnapshotResponse: example: data: - - roleId: 12345 + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 tenantId: DE - customerId: "54321" - - roleId: 12345 + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 tenantId: DE - customerId: "54321" + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description _links: - self: /v1/roles/12345 + self: /v1/compute/instances/12345/snapshots/snap1628603855 properties: data: items: - $ref: '#/components/schemas/CreateRoleResponseData' + $ref: '#/components/schemas/SnapshotResponse' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/roles/12345 + self: /v1/compute/instances/12345/snapshots/snap1628603855 required: - _links - data type: object - FindRoleResponse: + UpdateSnapshotRequest: + example: + name: Snapshot-Server + description: Snapshot-Description + properties: + name: + description: The name of the snapshot. Tags may contain letters, numbers, + colons, dashes, and underscores. There is a limit of 255 characters per + snapshot. + example: Snapshot-Server + maxLength: 255 + minLength: 1 + type: string + description: + description: The description of the snapshot. There is a limit of 255 characters + per snapshot. + example: Snapshot-Description + maxLength: 255 + minLength: 1 + type: string + type: object + UpdateSnapshotResponse: example: data: - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom - - roleId: 12345 - permissions: - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - resources: - - tagId: 12345 - tagName: Web - - tagId: 12345 - tagName: Web - actions: - - CREATE - - READ - accessAllResources: true + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description + - snapshotId: snap1628603855 + instanceId: 1234 + createdDate: 2021-06-02T12:32:03.363Z + autoDeleteDate: 2021-07-02T12:32:03.363Z + imageId: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + imageName: ubuntu-18.04 tenantId: DE - customerId: "54321" - name: infrastructure - admin: true - type: custom + customerId: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + name: Snapshot-Server + description: Snapshot-Description _links: - self: /v1/roles/12345 + self: /v1/compute/instances/12345/snapshots/snap1628603855 properties: data: items: - $ref: '#/components/schemas/RoleResponse' + $ref: '#/components/schemas/SnapshotResponse' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: /v1/roles/12345 + self: /v1/compute/instances/12345/snapshots/snap1628603855 required: - _links - data type: object - UpdateRoleRequest: - example: - permissions: - - apiName: infrastructure - resources: - - 1 - - 2 - - 3 - actions: - - CREATE - - READ - - apiName: infrastructure - resources: - - 1 - - 2 - - 3 - actions: - - CREATE - - READ - accessAllResources: false - name: infrastructure - admin: false - properties: - name: - description: The name of the role. There is a limit of 255 characters per - role. - example: infrastructure - maxLength: 255 - minLength: 1 - type: string - admin: - description: If user is admin he will have permissions to all API endpoints - and resources. Enabling this will superseed all role definitions and `accessAllResources`. - example: false - type: boolean - accessAllResources: - description: Allow access to all resources. This will superseed all assigned - resources in a role. - example: false - type: boolean - permissions: - items: - $ref: '#/components/schemas/PermissionRequest' - type: array - required: - - accessAllResources - - admin - - name + RollbackSnapshotRequest: + properties: {} type: object - UpdateRoleResponse: + RollbackSnapshotResponse: example: _links: - self: /v1/roles/12345 + self: /v1/compute/instances/12345/snapshots/snap1628603855 properties: _links: allOf: - $ref: '#/components/schemas/SelfLinks' description: Links for easy navigation. example: - self: /v1/roles/12345 + self: /v1/compute/instances/12345/snapshots/snap1628603855 required: - _links type: object - ApiPermissionsResponse: - example: - apiName: /v1/compute/instances - actions: - - CREATE - - READ + ApplicationConfig: properties: - apiName: - description: API endpoint. In order to get a list availbale api enpoints - please refer to the GET api-permissions endpoint. - example: /v1/compute/instances + imageId: + description: Image ID + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string + userDataId: + description: User Data ID + example: 8b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string + userData: + description: '[Cloud-Init](https://cloud-init.io/) Config in order to customize + during start of compute instance.' + example: |- + #cloud-config + user: admin + timezone: Europe/Berlin + chpasswd: + expire: False type: string - actions: - description: Action allowed for the API endpoint. Basically `CREATE` corresponds - to POST endpoints, `READ` to GET endpoints, `UPDATE` to PATCH / PUT endpoints - and `DELETE` to DELETE endpoints. - example: - - CREATE - - READ - items: - enum: - - CREATE - - READ - - UPDATE - - DELETE - type: string - type: array required: - - actions - - apiName + - imageId + - userData + - userDataId type: object - ListApiPermissionResponse: - example: - data: - - apiName: /v1/compute/instances - actions: - - CREATE - - READ - - apiName: /v1/compute/instances - actions: - - CREATE - - READ - _links: - first: /v1/roles/api-permissions?page=1 - previous: /v1/roles/api-permissions?page=2 - next: /v1/roles/api-permissions?page=3 - last: /v1/roles/api-permissions?page=10 - self: /v1/roles/api-permissions + MinimumRequirements: properties: - data: - items: - $ref: '#/components/schemas/ApiPermissionsResponse' - type: array - _links: + cpuCores: + description: CPU Cores Requirement + example: 2 + type: number + ramMb: + description: Memory Requirement in MB + example: 100 + type: number + diskMb: + description: Storage Requirement in MB + example: 500 + type: number + type: object + OptimalRequirements: + properties: + cpuCores: + description: CPU Cores Requirement + example: 2 + type: number + ramMb: + description: Memory Requirement in MB + example: 100 + type: number + diskMb: + description: Storage Requirement in MB + example: 500 + type: number + type: object + ApplicationRequirements: + properties: + minimum: allOf: - - $ref: '#/components/schemas/Links' - example: - first: /v1/roles/api-permissions?page=1 - previous: /v1/roles/api-permissions?page=2 - next: /v1/roles/api-permissions?page=3 - last: /v1/roles/api-permissions?page=10 - self: /v1/roles/api-permissions - required: - - _links - - data + - $ref: '#/components/schemas/MinimumRequirements' + description: Application minimum requirements + optimal: + allOf: + - $ref: '#/components/schemas/OptimalRequirements' + description: Application optimal requirements type: object - CredentialData: - example: - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y - secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY - accessKey: AKIAIOSFODNN7EXAMPLE - displayName: Object Storage Test - tenantId: DE - customerId: "54321" - credentialId: 12345 - region: European Union (Germany) + ApplicationResponse: properties: + applicationId: + description: Application ID + example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d + type: string tenantId: - description: Your customer tenant id + description: Tenant ID + enum: + - DE + - INT example: DE minLength: 1 type: string customerId: - description: Your customer number - example: "54321" + description: Customer ID + example: "12345" minLength: 1 type: string - accessKey: - description: Access key ID. - example: AKIAIOSFODNN7EXAMPLE - type: string - secretKey: - description: Secret key ID. - example: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY - type: string - objectStorageId: - description: Object Storage ID. - example: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y + name: + description: Application Name + example: Webmin type: string - displayName: - description: Object Storage Name. - example: Object Storage Test + description: + description: Application Description + example: Webmin cloud init type: string - region: - description: Object Storage Region. - example: European Union (Germany) + type: + description: Application type + enum: + - standard + - crypto + example: standard type: string - credentialId: - description: Object Storage Credential ID - example: 12345 - type: number + applicationConfig: + description: Application Config + items: + $ref: '#/components/schemas/ApplicationConfig' + type: array + requirements: + allOf: + - $ref: '#/components/schemas/ApplicationRequirements' + description: Application Requirements required: - - accessKey - - credentialId + - applicationConfig + - applicationId - customerId - - displayName - - objectStorageId - - region - - secretKey + - description + - name + - requirements - tenantId + - type type: object - ListCredentialResponse: - example: - data: - - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y - secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY - accessKey: AKIAIOSFODNN7EXAMPLE - displayName: Object Storage Test - tenantId: DE - customerId: "54321" - credentialId: 12345 - region: European Union (Germany) - - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y - secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY - accessKey: AKIAIOSFODNN7EXAMPLE - displayName: Object Storage Test - tenantId: DE - customerId: "54321" - credentialId: 12345 - region: European Union (Germany) - _links: - first: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=1 - next: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=19 - self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials/12345 - previous: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=21 - last: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=101 - _pagination: "" + ListApplicationsResponse: properties: _pagination: allOf: @@ -15249,61 +15549,91 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/CredentialData' + $ref: '#/components/schemas/ApplicationResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=1 - next: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=19 - self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials/12345 - previous: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=21 - last: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=101 + first: /v1/compute/applications?page=1 + previous: /v1/compute/applications?page=19 + self: /v1/compute/applications?page=20 + next: /v1/compute/applications?page=21 + last: /v1/compute/applications?page=101 required: - _links - _pagination - data type: object - FindCredentialResponse: - example: - data: - - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y - secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY - accessKey: AKIAIOSFODNN7EXAMPLE - displayName: Object Storage Test - tenantId: DE - customerId: "54321" - credentialId: 12345 - region: European Union (Germany) - - objectStorageId: 9a4c7e20-c326-4a8c-900c-687ad83ba170Y - secretKey: wJalrXK7MDENGbPxRfiCYEXAMPLEKEY - accessKey: AKIAIOSFODNN7EXAMPLE - displayName: Object Storage Test - tenantId: DE - customerId: "54321" - credentialId: 12345 - region: European Union (Germany) - _links: - self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/e3f0207c-f7fe-433a-92ab-39a9e976642d/credentials + VncResponse: + properties: + tenantId: + description: Your customer tenant id + enum: + - DE + - INT + example: DE + minLength: 1 + type: string + customerId: + description: Customer ID + example: 3f184ab8-a600-4e7c-8c9b-3413e21a3752 + minLength: 1 + type: string + instanceId: + description: Instance ID + example: 100 + format: int64 + type: integer + enabled: + description: VNC Status for the instance. + example: true + type: boolean + vncIp: + description: VNC IP for the instance. + example: 154.12.54.123 + type: string + vncPort: + description: VNC Port for the instance. + example: 8001 + type: number + required: + - customerId + - enabled + - instanceId + - tenantId + - vncIp + - vncPort + type: object + FindVncResponse: properties: data: items: - $ref: '#/components/schemas/CredentialData' + $ref: '#/components/schemas/VncResponse' type: array _links: allOf: - $ref: '#/components/schemas/SelfLinks' example: - self: v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/e3f0207c-f7fe-433a-92ab-39a9e976642d/credentials + self: /v1/compute/instances/100/vnc required: - _links - data type: object - UserAuditResponse: + PatchVncRequest: + properties: + vncPassword: + description: Password for instance VNC + example: test123 + type: string + required: + - vncPassword + type: object + ImageAuditResponseData: example: traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" + imageId: e443eab5-647a-4bc3-b4f9-16f5a281224d + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -15314,12 +15644,11 @@ components: name: test1 action: CREATED id: 12345 - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 timestamp: 2021-03-30T11:35:06.177Z username: John.Doe properties: id: - description: The identifier of the audit entry. + description: The ID of the audit entry. example: 12345 format: int64 type: integer @@ -15342,13 +15671,13 @@ components: minLength: 1 type: string customerId: - description: Customer number + description: Customer ID example: "54321" minLength: 1 type: string changedBy: - description: User ID - example: "54321" + description: Id of user who performed the change + example: c4c800ff-e524-47dd-9543-71dfc8b91113 minLength: 1 type: string username: @@ -15363,9 +15692,9 @@ components: description: The traceId of the API call which led to the change. example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - userId: - description: The identifier of the user - example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 + imageId: + description: The identifier of the image + example: e443eab5-647a-4bc3-b4f9-16f5a281224d type: string changes: description: List of actual changes. @@ -15380,18 +15709,19 @@ components: - changedBy - customerId - id + - imageId - requestId - tenantId - timestamp - traceId - - userId - username type: object - ListUserAuditResponse: + ImageAuditResponse: example: data: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" + imageId: e443eab5-647a-4bc3-b4f9-16f5a281224d + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -15402,11 +15732,11 @@ components: name: test1 action: CREATED id: 12345 - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 timestamp: 2021-03-30T11:35:06.177Z username: John.Doe - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" + imageId: e443eab5-647a-4bc3-b4f9-16f5a281224d + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 tenantId: DE customerId: "54321" @@ -15417,15 +15747,14 @@ components: name: test1 action: CREATED id: 12345 - userId: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 timestamp: 2021-03-30T11:35:06.177Z username: John.Doe _links: - first: /v1/users/audits?page=2 - previous: /v1/users/audits?page=2 - next: /v1/users/audits?page=3 - last: /v1/users/audits?page=10 - self: /v1/users/audits + first: /v1/compute/images/audits?page=2 + previous: /v1/compute/images/audits?page=2 + next: /v1/compute/images/audits?page=3 + last: /v1/compute/images/audits?page=10 + self: /v1/compute/images/audits _pagination: "" properties: _pagination: @@ -15434,28 +15763,29 @@ components: description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/UserAuditResponse' + $ref: '#/components/schemas/ImageAuditResponseData' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/users/audits?page=2 - previous: /v1/users/audits?page=2 - next: /v1/users/audits?page=3 - last: /v1/users/audits?page=10 - self: /v1/users/audits + first: /v1/compute/images/audits?page=2 + previous: /v1/compute/images/audits?page=2 + next: /v1/compute/images/audits?page=3 + last: /v1/compute/images/audits?page=10 + self: /v1/compute/images/audits required: - _links - _pagination - data type: object - RoleAuditResponse: + SnapshotsAuditResponse: example: traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" + instanceId: 12345 + snapshotId: snap1628603855 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - roleId: 12345 tenantId: DE customerId: "54321" changes: @@ -15469,7 +15799,7 @@ components: username: John.Doe properties: id: - description: The identifier of the audit entry. + description: The ID of the audit entry. example: 12345 format: int64 type: integer @@ -15492,13 +15822,13 @@ components: minLength: 1 type: string customerId: - description: Customer number + description: Customer ID example: "54321" minLength: 1 type: string changedBy: - description: User ID - example: "54321" + description: Id of user who performed the change + example: c4c800ff-e524-47dd-9543-71dfc8b91113 minLength: 1 type: string username: @@ -15513,13 +15843,18 @@ components: description: The traceId of the API call which led to the change. example: 78E9A428-94E9-4A2A-92F5-26038C6884F type: string - roleId: - description: The identifier of the role + instanceId: + description: The identifier of the instance example: 12345 + format: int64 minimum: 0 - type: number + type: integer + snapshotId: + description: The identifier of the snapshot + example: snap1628603855 + type: string changes: - description: List of actual changes. + description: List of actual changes example: prev: name: test @@ -15531,20 +15866,22 @@ components: - changedBy - customerId - id + - instanceId - requestId - - roleId + - snapshotId - tenantId - timestamp - traceId - username type: object - ListRoleAuditResponse: + ListSnapshotsAuditResponse: example: data: - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" + instanceId: 12345 + snapshotId: snap1628603855 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - roleId: 12345 tenantId: DE customerId: "54321" changes: @@ -15557,9 +15894,10 @@ components: timestamp: 2021-03-30T11:35:06.177Z username: John.Doe - traceId: 78E9A428-94E9-4A2A-92F5-26038C6884F - changedBy: "54321" + instanceId: 12345 + snapshotId: snap1628603855 + changedBy: c4c800ff-e524-47dd-9543-71dfc8b91113 requestId: A2F56FAF-18N0-4893-11HG-R312M1E4FEC5 - roleId: 12345 tenantId: DE customerId: "54321" changes: @@ -15572,27 +15910,33 @@ components: timestamp: 2021-03-30T11:35:06.177Z username: John.Doe _links: - first: /v1/roles/audits?page=2 - previous: /v1/roles/audits?page=2 - next: /v1/roles/audits?page=3 - last: /v1/roles/audits?page=10 - self: /v1/roles/audits + first: /v1/compute/snapshots/audits?page=2 + previous: /v1/compute/snapshots/audits?page=2 + next: /v1/compute/snapshots/audits?page=3 + last: /v1/compute/snapshots/audits?page=10 + self: /v1/compute/snapshots/audits + _pagination: "" properties: + _pagination: + allOf: + - $ref: '#/components/schemas/PaginationMeta' + description: Data about pagination like how many results, pages, page size. data: items: - $ref: '#/components/schemas/RoleAuditResponse' + $ref: '#/components/schemas/SnapshotsAuditResponse' type: array _links: allOf: - $ref: '#/components/schemas/Links' example: - first: /v1/roles/audits?page=2 - previous: /v1/roles/audits?page=2 - next: /v1/roles/audits?page=3 - last: /v1/roles/audits?page=10 - self: /v1/roles/audits + first: /v1/compute/snapshots/audits?page=2 + previous: /v1/compute/snapshots/audits?page=2 + next: /v1/compute/snapshots/audits?page=3 + last: /v1/compute/snapshots/audits?page=10 + self: /v1/compute/snapshots/audits required: - _links + - _pagination - data type: object securitySchemes: @@ -15659,3 +16003,6 @@ x-tagGroups: tags: - Secrets - Secrets Audits +- name: Tickets + tags: + - Tickets diff --git a/openapi/api_instances.go b/openapi/api_instances.go index 59a5e00..c370386 100644 --- a/openapi/api_instances.go +++ b/openapi/api_instances.go @@ -184,7 +184,7 @@ func (r ApiCreateInstanceRequest) Execute() (CreateInstanceResponse, *_nethttp.R /* CreateInstance Create a new instance -Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V41VPS XS SSD100 GB SSD
V40VPS XS NVME35 GB NVMe
V1VPS S SSD200 GB SSD
V35VPS S Storage400 GB SSD
V12VPS S NVMe50 GB NVMe
V2VPS M SSD400 GB SSD
V36VPS M Storage800 GB SSD
V13VPS M NVMe100 GB NVMe
V3VPS L SSD800 GB SSD
V37VPS L Storage1600 GB SSD
V14VPS L NVMe200 GB NVMe
V4VPS XL SSD1600 GB SSD
V38VPS XL SSD3200 GB SSD
V15VPS XL NVMe400 GB NVMe
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
+Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V45VPS 1 SSD400 GB SSD
V47VPS 1 Storage800 GB SSD
V46VPS 1 NVMe100 GB NVMe
V48VPS 2 SSD400 GB SSD
V50VPS 2 Storage800 GB SSD
V49VPS 2 NVMe200 GB NVMe
V51VPS 3 SSD1200 GB SSD
V53VPS 3 Storage2400 GB SSD
V52VPS 3 NVMe300 GB NVMe
V54VPS 4 SSD1600 GB SSD
V56VPS 4 Storage3200 GB SSD
V55VPS 4 NVMe400 GB NVMe
V57VPS 5 SSD2000 GB SSD
V59VPS 5 Storage4000 GB SSD
V58VPS 5 NVMe500 GB NVMe
V60VPS 6 SSD2400 GB SSD
V62VPS 6 Storage4800 GB SSD
V61VPS 6 NVMe600 GB NVMe
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateInstanceRequest diff --git a/openapi/api_tickets.go b/openapi/api_tickets.go new file mode 100644 index 0000000..cbe7e8d --- /dev/null +++ b/openapi/api_tickets.go @@ -0,0 +1,280 @@ +/* +Contabo API + +# Introduction Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples. Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and Installation instructions.](https://github.com/contabo/cntb) ## Product documentation If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/). ## Getting Started In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details)) You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool. ### Using the API directly #### Via `curl` for Linux/Unix like systems This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values. ```sh CLIENT_ID= CLIENT_SECRET= API_USER= API_PASSWORD='' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ``` #### Via `PowerShell` for Windows Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values. ```powershell $client_id='' $client_secret='' $api_user='' $api_password='' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ``` ### Using the Contabo API via the `cntb` CLI tool 1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github.com/contabo/cntb) 2. Unzip the downloaded file 3. You might move the executable to any location on your disk. You may update your `PATH` environment variable for easier invocation. 4. Configure it once to use your credentials ```sh cntb config set-credentials --oauth2-clientid= --oauth2-client-secret= --oauth2-user= --oauth2-password='' ``` 5. Use the CLI ```sh # get list of your instances cntb get instances # help cntb help ``` ## API Overview ### [Compute Management](#tag/Instances) The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping) of VPS and VDS (please note that Storage VPS are not supported via API or CLI) as well as managing snapshots and custom images. It also offers you to take advantage of [cloud-init](https://cloud-init.io/) at least on our default / standard images (for custom images you'll need to provide cloud-init support packages). The API offers provisioning of cloud-init scripts via the `user_data` field. Custom images must be provided in `.qcow2` or `.iso` format. This gives you even more flexibility for setting up your environment. ### [Object Storage](#tag/Object-Storages) The Object Storage API allows you to order, upgrade, cancel and control the auto-scaling feature for [S3](https://en.wikipedia.org/wiki/Amazon_S3) compatible object storage. You may also get some usage statistics. You can only buy one object storage per location. In case you need more storage space in a location you can purchase more space or enable the auto-scaling feature to purchase automatically more storage space up to the specified monthly limit. Please note that this is not the S3 compatible API. It is not documented here. The S3 compatible API needs to be used with the corresponding credentials, namely an `access_key` and `secret_key`. Those can be retrieved by invoking the User Management API. All purchased object storages in different locations share the same credentials. You are free to use S3 compatible tools like [`aws`](https://aws.amazon.com/cli/) cli or similar. ### [Private Networking](#tag/Private-Networks) The Private Networking API allows you to manage private networks / Virtual Private Clouds (VPC) for your Cloud VPS and VDS (please note that Storage VPS are not supported via API or CLI). Having a private network allows the associated instances to have a private and direct network connection. The traffic won't leave the data center and cannot be accessed by any other instance. With this feature you can create multi layer systems, e.g. having a database server being only accessible from your application servers in one private network and keep the database replication in a second, separate network. This increases the speed as the traffic is NOT routed to the internet and also security as the traffic is within it's own secured VLAN. Adding a Cloud VPS or VDS to a private network requires a reinstallation to make sure that all relevant parts for private networking are in place. When adding the same instance to another private network it will require a restart in order to make additional virtual network interface cards (NICs) available. Please note that for each instance being part of one or several private networks a payed add-on is required. You can automatically purchase it via the Compute Management API. ### [Secrets Management](#tag/Secrets) You can optionally save your passwords or public ssh keys using the Secrets Management API. You are not required to use it there will be no functional disadvantages. By using that API you can easily reuse you public ssh keys when setting up different servers without the need to look them up every time. It can also be used to allow Contabo Supporters to access your machine without sending the passwords via potentially unsecure emails. ### [User Management](#tag/Users) If you need to allow other persons or automation scripts to access specific API endpoints resp. resources the User Management API comes into play. With that API you are able to manage users having possibly restricted access. You are free to define those restrictions to fit your needs. So beside an arbitrary number of users you basically define any number of so called `roles`. Roles allows access and must be one of the following types: * `apiPermission` This allows you to specify a restriction to certain functions of an API by allowing control over POST (=Create), GET (=Read), PUT/PATCH (=Update) and DELETE (=Delete) methods for each API endpoint (URL) individually. * `resourcePermission` In order to restrict access to specific resources create a role with `resourcePermission` type by specifying any number of [tags](#tag-management). These tags need to be assigned to resources for them to take effect. E.g. a tag could be assigned to several compute resources. So that a user with that role (and of course access to the API endpoints via `apiPermission` role type) could only access those compute resources. The `roles` are then assigned to a `user`. You can assign one or several roles regardless of the role's type. Of course you could also assign a user `admin` privileges without specifying any roles. ### [Tag Management](#tag/Tags) The Tag Management API allows you to manage your tags in order to organize your resources in a more convenient way. Simply assign a tag to resources like a compute resource to manage them.The assignments of tags to resources will also enable you to control access to these specific resources to users via the [User Management API](#user-management). For convenience reasons you might choose a color for tag. The Customer Control Panel will use that color to display the tags. ## Requests The Contabo API supports HTTP requests like mentioned below. Not every endpoint supports all methods. The allowed methods are listed within this documentation. Method | Description --- | --- GET | To retrieve information about a resource, use the GET method.
The data is returned as a JSON object. GET methods are read-only and do not affect any resources. POST | Issue a POST method to create a new object. Include all needed attributes in the request body encoded as JSON. PATCH | Some resources support partial modification with PATCH,
which modifies specific attributes without updating the entire object representation. PUT | Use the PUT method to update information about a resource.
PUT will set new values on the item without regard to their current values. DELETE | Use the DELETE method to destroy a resource in your account.
If it is not found, the operation will return a 4xx error and an appropriate message. ## Responses Usually the Contabo API should respond to your requests. The data returned is in [JSON](https://www.json.org/) format allowing easy processing in any programming language or tools. As common for HTTP requests you will get back a so called HTTP status code. This gives you overall information about success or error. The following table lists common HTTP status codes. Please note that the description of the endpoints and methods are not listing all possibly status codes in detail as they are generic. Only special return codes with their resp. response data are explicitly listed. Response Code | Description --- | --- 200 | The response contains your requested information. 201 | Your request was accepted. The resource was created. 204 | Your request succeeded, there is no additional information returned. 400 | Your request was malformed. 401 | You did not supply valid authentication credentials. 402 | Request refused as it requires additional payed service. 403 | You are not allowed to perform the request. 404 | No results were found for your request or resource does not exist. 409 | Conflict with resources. For example violation of unique data constraints detected when trying to create or change resources. 429 | Rate-limit reached. Please wait for some time before doing more requests. 500 | We were unable to perform the request due to server-side problems. In such cases please retry or contact the support. Not every endpoint returns data. For example DELETE requests usually don't return any data. All others do return data. For easy handling the return values consists of metadata denoted with and underscore (\"_\") like `_links` or `_pagination`. The actual data is returned in a field called `data`. For convenience reasons this `data` field is always returned as an array even if it consists of only one single element. Some general details about Contabo API from [Contabo](https://contabo.com). + +API version: 1.0.0 +Contact: support@contabo.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" +) + +// Linger please +var ( + _ _context.Context +) + +// TicketsApiService TicketsApi service +type TicketsApiService service + +type ApiCreateSupportTicketRequest struct { + ctx _context.Context + ApiService *TicketsApiService + xRequestId *string + ticketCreateRequest *TicketCreateRequest + xTraceId *string +} + +// [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. +func (r ApiCreateSupportTicketRequest) XRequestId(xRequestId string) ApiCreateSupportTicketRequest { + r.xRequestId = &xRequestId + return r +} +func (r ApiCreateSupportTicketRequest) TicketCreateRequest(ticketCreateRequest TicketCreateRequest) ApiCreateSupportTicketRequest { + r.ticketCreateRequest = &ticketCreateRequest + return r +} +// Identifier to trace group of requests. +func (r ApiCreateSupportTicketRequest) XTraceId(xTraceId string) ApiCreateSupportTicketRequest { + r.xTraceId = &xTraceId + return r +} + +func (r ApiCreateSupportTicketRequest) Execute() (TicketCreateResponse, *_nethttp.Response, error) { + return r.ApiService.CreateSupportTicketExecute(r) +} + +/* +CreateSupportTicket Create a new support ticket + +Create a new support ticket + + @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateSupportTicketRequest +*/ +func (a *TicketsApiService) CreateSupportTicket(ctx _context.Context) ApiCreateSupportTicketRequest { + return ApiCreateSupportTicketRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TicketCreateResponse +func (a *TicketsApiService) CreateSupportTicketExecute(r ApiCreateSupportTicketRequest) (TicketCreateResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TicketCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TicketsApiService.CreateSupportTicket") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/tickets" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.xRequestId == nil { + return localVarReturnValue, nil, reportError("xRequestId is required and must be specified") + } + if r.ticketCreateRequest == nil { + return localVarReturnValue, nil, reportError("ticketCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["x-request-id"] = parameterToString(*r.xRequestId, "") + if r.xTraceId != nil { + localVarHeaderParams["x-trace-id"] = parameterToString(*r.xTraceId, "") + } + // body params + localVarPostBody = r.ticketCreateRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveTicketMetadataRequest struct { + ctx _context.Context + ApiService *TicketsApiService + xRequestId *string + xTraceId *string +} + +// [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. +func (r ApiRetrieveTicketMetadataRequest) XRequestId(xRequestId string) ApiRetrieveTicketMetadataRequest { + r.xRequestId = &xRequestId + return r +} +// Identifier to trace group of requests. +func (r ApiRetrieveTicketMetadataRequest) XTraceId(xTraceId string) ApiRetrieveTicketMetadataRequest { + r.xTraceId = &xTraceId + return r +} + +func (r ApiRetrieveTicketMetadataRequest) Execute() (ListTicketMetadataResponse, *_nethttp.Response, error) { + return r.ApiService.RetrieveTicketMetadataExecute(r) +} + +/* +RetrieveTicketMetadata Retrieve ticket metadata + +Retrieve ticket metadata + + @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRetrieveTicketMetadataRequest +*/ +func (a *TicketsApiService) RetrieveTicketMetadata(ctx _context.Context) ApiRetrieveTicketMetadataRequest { + return ApiRetrieveTicketMetadataRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListTicketMetadataResponse +func (a *TicketsApiService) RetrieveTicketMetadataExecute(r ApiRetrieveTicketMetadataRequest) (ListTicketMetadataResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListTicketMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TicketsApiService.RetrieveTicketMetadata") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/tickets/metadata" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.xRequestId == nil { + return localVarReturnValue, nil, reportError("xRequestId is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["x-request-id"] = parameterToString(*r.xRequestId, "") + if r.xTraceId != nil { + localVarHeaderParams["x-trace-id"] = parameterToString(*r.xTraceId, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/openapi/client.go b/openapi/client.go index 1b1658c..56edf5f 100644 --- a/openapi/client.go +++ b/openapi/client.go @@ -92,6 +92,8 @@ type APIClient struct { TagsAuditsApi *TagsAuditsApiService + TicketsApi *TicketsApiService + UsersApi *UsersApiService UsersAuditsApi *UsersAuditsApiService @@ -134,6 +136,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.TagAssignmentsAuditsApi = (*TagAssignmentsAuditsApiService)(&c.common) c.TagsApi = (*TagsApiService)(&c.common) c.TagsAuditsApi = (*TagsAuditsApiService)(&c.common) + c.TicketsApi = (*TicketsApiService)(&c.common) c.UsersApi = (*UsersApiService)(&c.common) c.UsersAuditsApi = (*UsersAuditsApiService)(&c.common) diff --git a/openapi/docs/CreateInstanceRequest.md b/openapi/docs/CreateInstanceRequest.md index a0b9de2..e074b6e 100644 --- a/openapi/docs/CreateInstanceRequest.md +++ b/openapi/docs/CreateInstanceRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ImageId** | Pointer to **string** | ImageId to be used to setup the compute instance. Default is Ubuntu 22.04 | [optional] [default to "afecbb85-e2fc-46f0-9684-b46b1faf00bb"] -**ProductId** | **string** | Default is V1 | [default to "V1"] +**ProductId** | Pointer to **string** | Default is V45 | [optional] [default to "V45"] **Region** | Pointer to **string** | Instance Region where the compute instance should be located. Default is EU | [optional] [default to "EU"] **SshKeys** | Pointer to **[]int64** | Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API. | [optional] **RootPassword** | Pointer to **int64** | `secretId` of the password for the `defaultUser` with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API. | [optional] @@ -21,7 +21,7 @@ Name | Type | Description | Notes ### NewCreateInstanceRequest -`func NewCreateInstanceRequest(productId string, period int64, ) *CreateInstanceRequest` +`func NewCreateInstanceRequest(period int64, ) *CreateInstanceRequest` NewCreateInstanceRequest instantiates a new CreateInstanceRequest object This constructor will assign default values to properties that have it defined, @@ -80,6 +80,11 @@ and a boolean to check if the value has been set. SetProductId sets ProductId field to given value. +### HasProductId + +`func (o *CreateInstanceRequest) HasProductId() bool` + +HasProductId returns a boolean if a field has been set. ### GetRegion diff --git a/openapi/docs/FindTagResponse.md b/openapi/docs/FindTagResponse.md index 58a21e6..dbc164c 100644 --- a/openapi/docs/FindTagResponse.md +++ b/openapi/docs/FindTagResponse.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]TagResponse1**](TagResponse1.md) | | +**Data** | [**[]TagResponse**](TagResponse.md) | | **Links** | [**SelfLinks**](SelfLinks.md) | | ## Methods ### NewFindTagResponse -`func NewFindTagResponse(data []TagResponse1, links SelfLinks, ) *FindTagResponse` +`func NewFindTagResponse(data []TagResponse, links SelfLinks, ) *FindTagResponse` NewFindTagResponse instantiates a new FindTagResponse object This constructor will assign default values to properties that have it defined, @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetData -`func (o *FindTagResponse) GetData() []TagResponse1` +`func (o *FindTagResponse) GetData() []TagResponse` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *FindTagResponse) GetDataOk() (*[]TagResponse1, bool)` +`func (o *FindTagResponse) GetDataOk() (*[]TagResponse, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetData -`func (o *FindTagResponse) SetData(v []TagResponse1)` +`func (o *FindTagResponse) SetData(v []TagResponse)` SetData sets Data field to given value. diff --git a/openapi/docs/InstanceResponse.md b/openapi/docs/InstanceResponse.md index f470173..65df64d 100644 --- a/openapi/docs/InstanceResponse.md +++ b/openapi/docs/InstanceResponse.md @@ -29,13 +29,14 @@ Name | Type | Description | Notes **AddOns** | [**[]AddOnResponse**](AddOnResponse.md) | | **ErrorMessage** | Pointer to **string** | Message in case of an error. | [optional] **ProductType** | **string** | Instance's category depending on Product Id | +**ProductName** | **string** | Instance's Product Name | **DefaultUser** | Pointer to **string** | Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. | [optional] ## Methods ### NewInstanceResponse -`func NewInstanceResponse(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string, ) *InstanceResponse` +`func NewInstanceResponse(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string, productName string, ) *InstanceResponse` NewInstanceResponse instantiates a new InstanceResponse object This constructor will assign default values to properties that have it defined, @@ -555,6 +556,26 @@ and a boolean to check if the value has been set. SetProductType sets ProductType field to given value. +### GetProductName + +`func (o *InstanceResponse) GetProductName() string` + +GetProductName returns the ProductName field if non-nil, zero value otherwise. + +### GetProductNameOk + +`func (o *InstanceResponse) GetProductNameOk() (*string, bool)` + +GetProductNameOk returns a tuple with the ProductName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductName + +`func (o *InstanceResponse) SetProductName(v string)` + +SetProductName sets ProductName field to given value. + + ### GetDefaultUser `func (o *InstanceResponse) GetDefaultUser() string` diff --git a/openapi/docs/InstancesApi.md b/openapi/docs/InstancesApi.md index dc622e4..52d569d 100644 --- a/openapi/docs/InstancesApi.md +++ b/openapi/docs/InstancesApi.md @@ -110,7 +110,7 @@ import ( func main() { xRequestId := "04e0f898-37b4-48bc-a794-1a57abe6aa31" // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - createInstanceRequest := *openapiclient.NewCreateInstanceRequest("V3", int64(6)) // CreateInstanceRequest | + createInstanceRequest := *openapiclient.NewCreateInstanceRequest(int64(6)) // CreateInstanceRequest | xTraceId := "xTraceId_example" // string | Identifier to trace group of requests. (optional) configuration := openapiclient.NewConfiguration() diff --git a/openapi/docs/ListImageResponseData.md b/openapi/docs/ListImageResponseData.md index 188c663..ae796aa 100644 --- a/openapi/docs/ListImageResponseData.md +++ b/openapi/docs/ListImageResponseData.md @@ -20,13 +20,13 @@ Name | Type | Description | Notes **StandardImage** | **bool** | Flag indicating that image is either a standard (true) or a custom image (false) | **CreationDate** | **time.Time** | The creation date time for the image | **LastModifiedDate** | **time.Time** | The last modified date time for the image | -**Tags** | [**[]TagResponse**](TagResponse.md) | The tags assigned to the image | +**Tags** | [**[]TagResponse1**](TagResponse1.md) | The tags assigned to the image | ## Methods ### NewListImageResponseData -`func NewListImageResponseData(imageId string, tenantId string, customerId string, name string, description string, url string, sizeMb float32, uploadedSizeMb float32, osType string, version string, format string, status string, errorMessage string, standardImage bool, creationDate time.Time, lastModifiedDate time.Time, tags []TagResponse, ) *ListImageResponseData` +`func NewListImageResponseData(imageId string, tenantId string, customerId string, name string, description string, url string, sizeMb float32, uploadedSizeMb float32, osType string, version string, format string, status string, errorMessage string, standardImage bool, creationDate time.Time, lastModifiedDate time.Time, tags []TagResponse1, ) *ListImageResponseData` NewListImageResponseData instantiates a new ListImageResponseData object This constructor will assign default values to properties that have it defined, @@ -363,20 +363,20 @@ SetLastModifiedDate sets LastModifiedDate field to given value. ### GetTags -`func (o *ListImageResponseData) GetTags() []TagResponse` +`func (o *ListImageResponseData) GetTags() []TagResponse1` GetTags returns the Tags field if non-nil, zero value otherwise. ### GetTagsOk -`func (o *ListImageResponseData) GetTagsOk() (*[]TagResponse, bool)` +`func (o *ListImageResponseData) GetTagsOk() (*[]TagResponse1, bool)` GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTags -`func (o *ListImageResponseData) SetTags(v []TagResponse)` +`func (o *ListImageResponseData) SetTags(v []TagResponse1)` SetTags sets Tags field to given value. diff --git a/openapi/docs/ListInstancesResponseData.md b/openapi/docs/ListInstancesResponseData.md index bfb9e6e..3a735c2 100644 --- a/openapi/docs/ListInstancesResponseData.md +++ b/openapi/docs/ListInstancesResponseData.md @@ -29,13 +29,14 @@ Name | Type | Description | Notes **AddOns** | [**[]AddOnResponse**](AddOnResponse.md) | | **ErrorMessage** | Pointer to **string** | Message in case of an error. | [optional] **ProductType** | **string** | Instance's category depending on Product Id | +**ProductName** | **string** | Instance's Product Name | **DefaultUser** | Pointer to **string** | Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. | [optional] ## Methods ### NewListInstancesResponseData -`func NewListInstancesResponseData(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string, ) *ListInstancesResponseData` +`func NewListInstancesResponseData(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string, productName string, ) *ListInstancesResponseData` NewListInstancesResponseData instantiates a new ListInstancesResponseData object This constructor will assign default values to properties that have it defined, @@ -555,6 +556,26 @@ and a boolean to check if the value has been set. SetProductType sets ProductType field to given value. +### GetProductName + +`func (o *ListInstancesResponseData) GetProductName() string` + +GetProductName returns the ProductName field if non-nil, zero value otherwise. + +### GetProductNameOk + +`func (o *ListInstancesResponseData) GetProductNameOk() (*string, bool)` + +GetProductNameOk returns a tuple with the ProductName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductName + +`func (o *ListInstancesResponseData) SetProductName(v string)` + +SetProductName sets ProductName field to given value. + + ### GetDefaultUser `func (o *ListInstancesResponseData) GetDefaultUser() string` diff --git a/openapi/docs/ListTagResponse.md b/openapi/docs/ListTagResponse.md index c9ca371..65e0afb 100644 --- a/openapi/docs/ListTagResponse.md +++ b/openapi/docs/ListTagResponse.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | -**Data** | [**[]TagResponse1**](TagResponse1.md) | | +**Data** | [**[]TagResponse**](TagResponse.md) | | **Links** | [**Links**](Links.md) | | ## Methods ### NewListTagResponse -`func NewListTagResponse(pagination PaginationMeta, data []TagResponse1, links Links, ) *ListTagResponse` +`func NewListTagResponse(pagination PaginationMeta, data []TagResponse, links Links, ) *ListTagResponse` NewListTagResponse instantiates a new ListTagResponse object This constructor will assign default values to properties that have it defined, @@ -49,20 +49,20 @@ SetPagination sets Pagination field to given value. ### GetData -`func (o *ListTagResponse) GetData() []TagResponse1` +`func (o *ListTagResponse) GetData() []TagResponse` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *ListTagResponse) GetDataOk() (*[]TagResponse1, bool)` +`func (o *ListTagResponse) GetDataOk() (*[]TagResponse, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetData -`func (o *ListTagResponse) SetData(v []TagResponse1)` +`func (o *ListTagResponse) SetData(v []TagResponse)` SetData sets Data field to given value. diff --git a/openapi/docs/ListTicketMetadataResponse.md b/openapi/docs/ListTicketMetadataResponse.md new file mode 100644 index 0000000..46de973 --- /dev/null +++ b/openapi/docs/ListTicketMetadataResponse.md @@ -0,0 +1,72 @@ +# ListTicketMetadataResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]MetadataType**](MetadataType.md) | | +**Links** | [**SelfLinks**](SelfLinks.md) | | + +## Methods + +### NewListTicketMetadataResponse + +`func NewListTicketMetadataResponse(data []MetadataType, links SelfLinks, ) *ListTicketMetadataResponse` + +NewListTicketMetadataResponse instantiates a new ListTicketMetadataResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListTicketMetadataResponseWithDefaults + +`func NewListTicketMetadataResponseWithDefaults() *ListTicketMetadataResponse` + +NewListTicketMetadataResponseWithDefaults instantiates a new ListTicketMetadataResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ListTicketMetadataResponse) GetData() []MetadataType` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListTicketMetadataResponse) GetDataOk() (*[]MetadataType, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListTicketMetadataResponse) SetData(v []MetadataType)` + +SetData sets Data field to given value. + + +### GetLinks + +`func (o *ListTicketMetadataResponse) GetLinks() SelfLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *ListTicketMetadataResponse) GetLinksOk() (*SelfLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *ListTicketMetadataResponse) SetLinks(v SelfLinks)` + +SetLinks sets Links field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/openapi/docs/MetadataType.md b/openapi/docs/MetadataType.md new file mode 100644 index 0000000..3186db0 --- /dev/null +++ b/openapi/docs/MetadataType.md @@ -0,0 +1,114 @@ +# MetadataType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TenantId** | **string** | Your customer tenant id | +**CustomerId** | **string** | Your customer number | +**Name** | **string** | Type name | +**AvailableChoices** | **[]string** | Available choices | + +## Methods + +### NewMetadataType + +`func NewMetadataType(tenantId string, customerId string, name string, availableChoices []string, ) *MetadataType` + +NewMetadataType instantiates a new MetadataType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMetadataTypeWithDefaults + +`func NewMetadataTypeWithDefaults() *MetadataType` + +NewMetadataTypeWithDefaults instantiates a new MetadataType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTenantId + +`func (o *MetadataType) GetTenantId() string` + +GetTenantId returns the TenantId field if non-nil, zero value otherwise. + +### GetTenantIdOk + +`func (o *MetadataType) GetTenantIdOk() (*string, bool)` + +GetTenantIdOk returns a tuple with the TenantId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTenantId + +`func (o *MetadataType) SetTenantId(v string)` + +SetTenantId sets TenantId field to given value. + + +### GetCustomerId + +`func (o *MetadataType) GetCustomerId() string` + +GetCustomerId returns the CustomerId field if non-nil, zero value otherwise. + +### GetCustomerIdOk + +`func (o *MetadataType) GetCustomerIdOk() (*string, bool)` + +GetCustomerIdOk returns a tuple with the CustomerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerId + +`func (o *MetadataType) SetCustomerId(v string)` + +SetCustomerId sets CustomerId field to given value. + + +### GetName + +`func (o *MetadataType) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *MetadataType) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *MetadataType) SetName(v string)` + +SetName sets Name field to given value. + + +### GetAvailableChoices + +`func (o *MetadataType) GetAvailableChoices() []string` + +GetAvailableChoices returns the AvailableChoices field if non-nil, zero value otherwise. + +### GetAvailableChoicesOk + +`func (o *MetadataType) GetAvailableChoicesOk() (*[]string, bool)` + +GetAvailableChoicesOk returns a tuple with the AvailableChoices field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAvailableChoices + +`func (o *MetadataType) SetAvailableChoices(v []string)` + +SetAvailableChoices sets AvailableChoices field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/openapi/docs/TagResponse.md b/openapi/docs/TagResponse.md index 8e2f73e..0de871a 100644 --- a/openapi/docs/TagResponse.md +++ b/openapi/docs/TagResponse.md @@ -4,14 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**TenantId** | **string** | Your customer tenant id | +**CustomerId** | **string** | Your customer number | **TagId** | **float32** | Tag's id | -**TagName** | **string** | Tag's name | +**Name** | **string** | Tag's name | +**Color** | **string** | Tag's color | ## Methods ### NewTagResponse -`func NewTagResponse(tagId float32, tagName string, ) *TagResponse` +`func NewTagResponse(tenantId string, customerId string, tagId float32, name string, color string, ) *TagResponse` NewTagResponse instantiates a new TagResponse object This constructor will assign default values to properties that have it defined, @@ -26,6 +29,46 @@ NewTagResponseWithDefaults instantiates a new TagResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetTenantId + +`func (o *TagResponse) GetTenantId() string` + +GetTenantId returns the TenantId field if non-nil, zero value otherwise. + +### GetTenantIdOk + +`func (o *TagResponse) GetTenantIdOk() (*string, bool)` + +GetTenantIdOk returns a tuple with the TenantId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTenantId + +`func (o *TagResponse) SetTenantId(v string)` + +SetTenantId sets TenantId field to given value. + + +### GetCustomerId + +`func (o *TagResponse) GetCustomerId() string` + +GetCustomerId returns the CustomerId field if non-nil, zero value otherwise. + +### GetCustomerIdOk + +`func (o *TagResponse) GetCustomerIdOk() (*string, bool)` + +GetCustomerIdOk returns a tuple with the CustomerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerId + +`func (o *TagResponse) SetCustomerId(v string)` + +SetCustomerId sets CustomerId field to given value. + + ### GetTagId `func (o *TagResponse) GetTagId() float32` @@ -46,24 +89,44 @@ and a boolean to check if the value has been set. SetTagId sets TagId field to given value. -### GetTagName +### GetName + +`func (o *TagResponse) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TagResponse) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TagResponse) SetName(v string)` + +SetName sets Name field to given value. + + +### GetColor -`func (o *TagResponse) GetTagName() string` +`func (o *TagResponse) GetColor() string` -GetTagName returns the TagName field if non-nil, zero value otherwise. +GetColor returns the Color field if non-nil, zero value otherwise. -### GetTagNameOk +### GetColorOk -`func (o *TagResponse) GetTagNameOk() (*string, bool)` +`func (o *TagResponse) GetColorOk() (*string, bool)` -GetTagNameOk returns a tuple with the TagName field if it's non-nil, zero value otherwise +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetTagName +### SetColor -`func (o *TagResponse) SetTagName(v string)` +`func (o *TagResponse) SetColor(v string)` -SetTagName sets TagName field to given value. +SetColor sets Color field to given value. diff --git a/openapi/docs/TagResponse1.md b/openapi/docs/TagResponse1.md index 5ef5ce5..e90fbb7 100644 --- a/openapi/docs/TagResponse1.md +++ b/openapi/docs/TagResponse1.md @@ -4,17 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TenantId** | **string** | Your customer tenant id | -**CustomerId** | **string** | Your customer number | **TagId** | **float32** | Tag's id | -**Name** | **string** | Tag's name | -**Color** | **string** | Tag's color | +**TagName** | **string** | Tag's name | ## Methods ### NewTagResponse1 -`func NewTagResponse1(tenantId string, customerId string, tagId float32, name string, color string, ) *TagResponse1` +`func NewTagResponse1(tagId float32, tagName string, ) *TagResponse1` NewTagResponse1 instantiates a new TagResponse1 object This constructor will assign default values to properties that have it defined, @@ -29,46 +26,6 @@ NewTagResponse1WithDefaults instantiates a new TagResponse1 object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetTenantId - -`func (o *TagResponse1) GetTenantId() string` - -GetTenantId returns the TenantId field if non-nil, zero value otherwise. - -### GetTenantIdOk - -`func (o *TagResponse1) GetTenantIdOk() (*string, bool)` - -GetTenantIdOk returns a tuple with the TenantId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTenantId - -`func (o *TagResponse1) SetTenantId(v string)` - -SetTenantId sets TenantId field to given value. - - -### GetCustomerId - -`func (o *TagResponse1) GetCustomerId() string` - -GetCustomerId returns the CustomerId field if non-nil, zero value otherwise. - -### GetCustomerIdOk - -`func (o *TagResponse1) GetCustomerIdOk() (*string, bool)` - -GetCustomerIdOk returns a tuple with the CustomerId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomerId - -`func (o *TagResponse1) SetCustomerId(v string)` - -SetCustomerId sets CustomerId field to given value. - - ### GetTagId `func (o *TagResponse1) GetTagId() float32` @@ -89,44 +46,24 @@ and a boolean to check if the value has been set. SetTagId sets TagId field to given value. -### GetName - -`func (o *TagResponse1) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *TagResponse1) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *TagResponse1) SetName(v string)` - -SetName sets Name field to given value. - - -### GetColor +### GetTagName -`func (o *TagResponse1) GetColor() string` +`func (o *TagResponse1) GetTagName() string` -GetColor returns the Color field if non-nil, zero value otherwise. +GetTagName returns the TagName field if non-nil, zero value otherwise. -### GetColorOk +### GetTagNameOk -`func (o *TagResponse1) GetColorOk() (*string, bool)` +`func (o *TagResponse1) GetTagNameOk() (*string, bool)` -GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +GetTagNameOk returns a tuple with the TagName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetColor +### SetTagName -`func (o *TagResponse1) SetColor(v string)` +`func (o *TagResponse1) SetTagName(v string)` -SetColor sets Color field to given value. +SetTagName sets TagName field to given value. diff --git a/openapi/docs/TicketCreateRequest.md b/openapi/docs/TicketCreateRequest.md new file mode 100644 index 0000000..ba8466d --- /dev/null +++ b/openapi/docs/TicketCreateRequest.md @@ -0,0 +1,166 @@ +# TicketCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | Ticket description | +**Subject** | **string** | Ticket subject | +**Tags** | Pointer to **[]string** | Ticket tags | [optional] +**Type** | **string** | Ticket type | +**AssignedGroup** | Pointer to **string** | Ticket Group | [optional] +**SourceClient** | **string** | Ticket Source | + +## Methods + +### NewTicketCreateRequest + +`func NewTicketCreateRequest(description string, subject string, type_ string, sourceClient string, ) *TicketCreateRequest` + +NewTicketCreateRequest instantiates a new TicketCreateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTicketCreateRequestWithDefaults + +`func NewTicketCreateRequestWithDefaults() *TicketCreateRequest` + +NewTicketCreateRequestWithDefaults instantiates a new TicketCreateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *TicketCreateRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TicketCreateRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *TicketCreateRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetSubject + +`func (o *TicketCreateRequest) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *TicketCreateRequest) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *TicketCreateRequest) SetSubject(v string)` + +SetSubject sets Subject field to given value. + + +### GetTags + +`func (o *TicketCreateRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *TicketCreateRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *TicketCreateRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *TicketCreateRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetType + +`func (o *TicketCreateRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TicketCreateRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TicketCreateRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAssignedGroup + +`func (o *TicketCreateRequest) GetAssignedGroup() string` + +GetAssignedGroup returns the AssignedGroup field if non-nil, zero value otherwise. + +### GetAssignedGroupOk + +`func (o *TicketCreateRequest) GetAssignedGroupOk() (*string, bool)` + +GetAssignedGroupOk returns a tuple with the AssignedGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssignedGroup + +`func (o *TicketCreateRequest) SetAssignedGroup(v string)` + +SetAssignedGroup sets AssignedGroup field to given value. + +### HasAssignedGroup + +`func (o *TicketCreateRequest) HasAssignedGroup() bool` + +HasAssignedGroup returns a boolean if a field has been set. + +### GetSourceClient + +`func (o *TicketCreateRequest) GetSourceClient() string` + +GetSourceClient returns the SourceClient field if non-nil, zero value otherwise. + +### GetSourceClientOk + +`func (o *TicketCreateRequest) GetSourceClientOk() (*string, bool)` + +GetSourceClientOk returns a tuple with the SourceClient field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceClient + +`func (o *TicketCreateRequest) SetSourceClient(v string)` + +SetSourceClient sets SourceClient field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/openapi/docs/TicketCreateResponse.md b/openapi/docs/TicketCreateResponse.md new file mode 100644 index 0000000..abb9437 --- /dev/null +++ b/openapi/docs/TicketCreateResponse.md @@ -0,0 +1,72 @@ +# TicketCreateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]TicketResponse**](TicketResponse.md) | | +**Links** | [**SelfLinks**](SelfLinks.md) | | + +## Methods + +### NewTicketCreateResponse + +`func NewTicketCreateResponse(data []TicketResponse, links SelfLinks, ) *TicketCreateResponse` + +NewTicketCreateResponse instantiates a new TicketCreateResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTicketCreateResponseWithDefaults + +`func NewTicketCreateResponseWithDefaults() *TicketCreateResponse` + +NewTicketCreateResponseWithDefaults instantiates a new TicketCreateResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *TicketCreateResponse) GetData() []TicketResponse` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TicketCreateResponse) GetDataOk() (*[]TicketResponse, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *TicketCreateResponse) SetData(v []TicketResponse)` + +SetData sets Data field to given value. + + +### GetLinks + +`func (o *TicketCreateResponse) GetLinks() SelfLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *TicketCreateResponse) GetLinksOk() (*SelfLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *TicketCreateResponse) SetLinks(v SelfLinks)` + +SetLinks sets Links field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/openapi/docs/TicketResponse.md b/openapi/docs/TicketResponse.md new file mode 100644 index 0000000..b77a5b3 --- /dev/null +++ b/openapi/docs/TicketResponse.md @@ -0,0 +1,303 @@ +# TicketResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TenantId** | **string** | Your customer tenant id | +**CustomerId** | **string** | Your customer number | +**Email** | **string** | Ticket email | +**IsEscalated** | **bool** | Ticket escalated flag | +**Priority** | **string** | Ticket priority | +**Status** | **string** | Ticket status | +**Subject** | **string** | Ticket subject | +**Description** | **string** | Ticket description | +**CreatedDate** | **string** | Created Date | +**UpdatedDate** | **string** | Created Date | +**Tags** | **[]string** | Ticket tags | +**TicketId** | **int64** | Ticket ID | +**Type** | **string** | Ticket type | + +## Methods + +### NewTicketResponse + +`func NewTicketResponse(tenantId string, customerId string, email string, isEscalated bool, priority string, status string, subject string, description string, createdDate string, updatedDate string, tags []string, ticketId int64, type_ string, ) *TicketResponse` + +NewTicketResponse instantiates a new TicketResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTicketResponseWithDefaults + +`func NewTicketResponseWithDefaults() *TicketResponse` + +NewTicketResponseWithDefaults instantiates a new TicketResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTenantId + +`func (o *TicketResponse) GetTenantId() string` + +GetTenantId returns the TenantId field if non-nil, zero value otherwise. + +### GetTenantIdOk + +`func (o *TicketResponse) GetTenantIdOk() (*string, bool)` + +GetTenantIdOk returns a tuple with the TenantId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTenantId + +`func (o *TicketResponse) SetTenantId(v string)` + +SetTenantId sets TenantId field to given value. + + +### GetCustomerId + +`func (o *TicketResponse) GetCustomerId() string` + +GetCustomerId returns the CustomerId field if non-nil, zero value otherwise. + +### GetCustomerIdOk + +`func (o *TicketResponse) GetCustomerIdOk() (*string, bool)` + +GetCustomerIdOk returns a tuple with the CustomerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerId + +`func (o *TicketResponse) SetCustomerId(v string)` + +SetCustomerId sets CustomerId field to given value. + + +### GetEmail + +`func (o *TicketResponse) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *TicketResponse) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *TicketResponse) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetIsEscalated + +`func (o *TicketResponse) GetIsEscalated() bool` + +GetIsEscalated returns the IsEscalated field if non-nil, zero value otherwise. + +### GetIsEscalatedOk + +`func (o *TicketResponse) GetIsEscalatedOk() (*bool, bool)` + +GetIsEscalatedOk returns a tuple with the IsEscalated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEscalated + +`func (o *TicketResponse) SetIsEscalated(v bool)` + +SetIsEscalated sets IsEscalated field to given value. + + +### GetPriority + +`func (o *TicketResponse) GetPriority() string` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *TicketResponse) GetPriorityOk() (*string, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *TicketResponse) SetPriority(v string)` + +SetPriority sets Priority field to given value. + + +### GetStatus + +`func (o *TicketResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TicketResponse) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *TicketResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetSubject + +`func (o *TicketResponse) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *TicketResponse) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *TicketResponse) SetSubject(v string)` + +SetSubject sets Subject field to given value. + + +### GetDescription + +`func (o *TicketResponse) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TicketResponse) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *TicketResponse) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetCreatedDate + +`func (o *TicketResponse) GetCreatedDate() string` + +GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. + +### GetCreatedDateOk + +`func (o *TicketResponse) GetCreatedDateOk() (*string, bool)` + +GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedDate + +`func (o *TicketResponse) SetCreatedDate(v string)` + +SetCreatedDate sets CreatedDate field to given value. + + +### GetUpdatedDate + +`func (o *TicketResponse) GetUpdatedDate() string` + +GetUpdatedDate returns the UpdatedDate field if non-nil, zero value otherwise. + +### GetUpdatedDateOk + +`func (o *TicketResponse) GetUpdatedDateOk() (*string, bool)` + +GetUpdatedDateOk returns a tuple with the UpdatedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedDate + +`func (o *TicketResponse) SetUpdatedDate(v string)` + +SetUpdatedDate sets UpdatedDate field to given value. + + +### GetTags + +`func (o *TicketResponse) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *TicketResponse) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *TicketResponse) SetTags(v []string)` + +SetTags sets Tags field to given value. + + +### GetTicketId + +`func (o *TicketResponse) GetTicketId() int64` + +GetTicketId returns the TicketId field if non-nil, zero value otherwise. + +### GetTicketIdOk + +`func (o *TicketResponse) GetTicketIdOk() (*int64, bool)` + +GetTicketIdOk returns a tuple with the TicketId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTicketId + +`func (o *TicketResponse) SetTicketId(v int64)` + +SetTicketId sets TicketId field to given value. + + +### GetType + +`func (o *TicketResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TicketResponse) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TicketResponse) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/openapi/docs/TicketsApi.md b/openapi/docs/TicketsApi.md new file mode 100644 index 0000000..748f81d --- /dev/null +++ b/openapi/docs/TicketsApi.md @@ -0,0 +1,148 @@ +# \TicketsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSupportTicket**](TicketsApi.md#CreateSupportTicket) | **Post** /v1/tickets | Create a new support ticket +[**RetrieveTicketMetadata**](TicketsApi.md#RetrieveTicketMetadata) | **Get** /v1/tickets/metadata | Retrieve ticket metadata + + + +## CreateSupportTicket + +> TicketCreateResponse CreateSupportTicket(ctx).XRequestId(xRequestId).TicketCreateRequest(ticketCreateRequest).XTraceId(xTraceId).Execute() + +Create a new support ticket + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + xRequestId := "04e0f898-37b4-48bc-a794-1a57abe6aa31" // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + ticketCreateRequest := *openapiclient.NewTicketCreateRequest("Some details on the issue", "New support ticket", "Incident", "Website") // TicketCreateRequest | + xTraceId := "xTraceId_example" // string | Identifier to trace group of requests. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.TicketsApi.CreateSupportTicket(context.Background()).XRequestId(xRequestId).TicketCreateRequest(ticketCreateRequest).XTraceId(xTraceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TicketsApi.CreateSupportTicket``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateSupportTicket`: TicketCreateResponse + fmt.Fprintf(os.Stdout, "Response from `TicketsApi.CreateSupportTicket`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateSupportTicketRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xRequestId** | **string** | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **ticketCreateRequest** | [**TicketCreateRequest**](TicketCreateRequest.md) | | + **xTraceId** | **string** | Identifier to trace group of requests. | + +### Return type + +[**TicketCreateResponse**](TicketCreateResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveTicketMetadata + +> ListTicketMetadataResponse RetrieveTicketMetadata(ctx).XRequestId(xRequestId).XTraceId(xTraceId).Execute() + +Retrieve ticket metadata + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + xRequestId := "04e0f898-37b4-48bc-a794-1a57abe6aa31" // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + xTraceId := "xTraceId_example" // string | Identifier to trace group of requests. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.TicketsApi.RetrieveTicketMetadata(context.Background()).XRequestId(xRequestId).XTraceId(xTraceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TicketsApi.RetrieveTicketMetadata``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveTicketMetadata`: ListTicketMetadataResponse + fmt.Fprintf(os.Stdout, "Response from `TicketsApi.RetrieveTicketMetadata`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveTicketMetadataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xRequestId** | **string** | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **xTraceId** | **string** | Identifier to trace group of requests. | + +### Return type + +[**ListTicketMetadataResponse**](ListTicketMetadataResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/openapi/model_create_instance_request.go b/openapi/model_create_instance_request.go index 836a753..32e7176 100644 --- a/openapi/model_create_instance_request.go +++ b/openapi/model_create_instance_request.go @@ -19,8 +19,8 @@ import ( type CreateInstanceRequest struct { // ImageId to be used to setup the compute instance. Default is Ubuntu 22.04 ImageId *string `json:"imageId,omitempty"` - // Default is V1 - ProductId string `json:"productId"` + // Default is V45 + ProductId *string `json:"productId,omitempty"` // Instance Region where the compute instance should be located. Default is EU Region *string `json:"region,omitempty"` // Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API. @@ -47,11 +47,12 @@ type CreateInstanceRequest struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateInstanceRequest(productId string, period int64) *CreateInstanceRequest { +func NewCreateInstanceRequest(period int64) *CreateInstanceRequest { this := CreateInstanceRequest{} var imageId string = "afecbb85-e2fc-46f0-9684-b46b1faf00bb" this.ImageId = &imageId - this.ProductId = productId + var productId string = "V45" + this.ProductId = &productId var region string = "EU" this.Region = ®ion this.Period = period @@ -67,8 +68,8 @@ func NewCreateInstanceRequestWithDefaults() *CreateInstanceRequest { this := CreateInstanceRequest{} var imageId string = "afecbb85-e2fc-46f0-9684-b46b1faf00bb" this.ImageId = &imageId - var productId string = "V1" - this.ProductId = productId + var productId string = "V45" + this.ProductId = &productId var region string = "EU" this.Region = ®ion var period int64 = 1 @@ -110,28 +111,36 @@ func (o *CreateInstanceRequest) SetImageId(v string) { o.ImageId = &v } -// GetProductId returns the ProductId field value +// GetProductId returns the ProductId field value if set, zero value otherwise. func (o *CreateInstanceRequest) GetProductId() string { - if o == nil { + if o == nil || o.ProductId == nil { var ret string return ret } - - return o.ProductId + return *o.ProductId } -// GetProductIdOk returns a tuple with the ProductId field value +// GetProductIdOk returns a tuple with the ProductId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CreateInstanceRequest) GetProductIdOk() (*string, bool) { - if o == nil { + if o == nil || o.ProductId == nil { return nil, false } - return &o.ProductId, true + return o.ProductId, true +} + +// HasProductId returns a boolean if a field has been set. +func (o *CreateInstanceRequest) HasProductId() bool { + if o != nil && o.ProductId != nil { + return true + } + + return false } -// SetProductId sets field value +// SetProductId gets a reference to the given string and assigns it to the ProductId field. func (o *CreateInstanceRequest) SetProductId(v string) { - o.ProductId = v + o.ProductId = &v } // GetRegion returns the Region field value if set, zero value otherwise. @@ -451,7 +460,7 @@ func (o CreateInstanceRequest) MarshalJSON() ([]byte, error) { if o.ImageId != nil { toSerialize["imageId"] = o.ImageId } - if true { + if o.ProductId != nil { toSerialize["productId"] = o.ProductId } if o.Region != nil { diff --git a/openapi/model_find_tag_response.go b/openapi/model_find_tag_response.go index b18f156..8a14a65 100644 --- a/openapi/model_find_tag_response.go +++ b/openapi/model_find_tag_response.go @@ -17,7 +17,7 @@ import ( // FindTagResponse struct for FindTagResponse type FindTagResponse struct { - Data []TagResponse1 `json:"data"` + Data []TagResponse `json:"data"` Links SelfLinks `json:"_links"` } @@ -25,7 +25,7 @@ type FindTagResponse struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFindTagResponse(data []TagResponse1, links SelfLinks) *FindTagResponse { +func NewFindTagResponse(data []TagResponse, links SelfLinks) *FindTagResponse { this := FindTagResponse{} this.Data = data this.Links = links @@ -41,9 +41,9 @@ func NewFindTagResponseWithDefaults() *FindTagResponse { } // GetData returns the Data field value -func (o *FindTagResponse) GetData() []TagResponse1 { +func (o *FindTagResponse) GetData() []TagResponse { if o == nil { - var ret []TagResponse1 + var ret []TagResponse return ret } @@ -52,7 +52,7 @@ func (o *FindTagResponse) GetData() []TagResponse1 { // GetDataOk returns a tuple with the Data field value // and a boolean to check if the value has been set. -func (o *FindTagResponse) GetDataOk() (*[]TagResponse1, bool) { +func (o *FindTagResponse) GetDataOk() (*[]TagResponse, bool) { if o == nil { return nil, false } @@ -60,7 +60,7 @@ func (o *FindTagResponse) GetDataOk() (*[]TagResponse1, bool) { } // SetData sets field value -func (o *FindTagResponse) SetData(v []TagResponse1) { +func (o *FindTagResponse) SetData(v []TagResponse) { o.Data = v } diff --git a/openapi/model_instance_response.go b/openapi/model_instance_response.go index 5bff1de..6daec40 100644 --- a/openapi/model_instance_response.go +++ b/openapi/model_instance_response.go @@ -64,6 +64,8 @@ type InstanceResponse struct { ErrorMessage *string `json:"errorMessage,omitempty"` // Instance's category depending on Product Id ProductType string `json:"productType"` + // Instance's Product Name + ProductName string `json:"productName"` // Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. DefaultUser *string `json:"defaultUser,omitempty"` } @@ -72,7 +74,7 @@ type InstanceResponse struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInstanceResponse(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string) *InstanceResponse { +func NewInstanceResponse(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string, productName string) *InstanceResponse { this := InstanceResponse{} this.TenantId = tenantId this.CustomerId = customerId @@ -98,6 +100,7 @@ func NewInstanceResponse(tenantId string, customerId string, additionalIps []Add this.VHostId = vHostId this.AddOns = addOns this.ProductType = productType + this.ProductName = productName return &this } @@ -717,6 +720,30 @@ func (o *InstanceResponse) SetProductType(v string) { o.ProductType = v } +// GetProductName returns the ProductName field value +func (o *InstanceResponse) GetProductName() string { + if o == nil { + var ret string + return ret + } + + return o.ProductName +} + +// GetProductNameOk returns a tuple with the ProductName field value +// and a boolean to check if the value has been set. +func (o *InstanceResponse) GetProductNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductName, true +} + +// SetProductName sets field value +func (o *InstanceResponse) SetProductName(v string) { + o.ProductName = v +} + // GetDefaultUser returns the DefaultUser field value if set, zero value otherwise. func (o *InstanceResponse) GetDefaultUser() string { if o == nil || o.DefaultUser == nil { @@ -826,6 +853,9 @@ func (o InstanceResponse) MarshalJSON() ([]byte, error) { if true { toSerialize["productType"] = o.ProductType } + if true { + toSerialize["productName"] = o.ProductName + } if o.DefaultUser != nil { toSerialize["defaultUser"] = o.DefaultUser } diff --git a/openapi/model_list_image_response_data.go b/openapi/model_list_image_response_data.go index 0a3ae90..4c3405d 100644 --- a/openapi/model_list_image_response_data.go +++ b/openapi/model_list_image_response_data.go @@ -51,14 +51,14 @@ type ListImageResponseData struct { // The last modified date time for the image LastModifiedDate time.Time `json:"lastModifiedDate"` // The tags assigned to the image - Tags []TagResponse `json:"tags"` + Tags []TagResponse1 `json:"tags"` } // NewListImageResponseData instantiates a new ListImageResponseData object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewListImageResponseData(imageId string, tenantId string, customerId string, name string, description string, url string, sizeMb float32, uploadedSizeMb float32, osType string, version string, format string, status string, errorMessage string, standardImage bool, creationDate time.Time, lastModifiedDate time.Time, tags []TagResponse) *ListImageResponseData { +func NewListImageResponseData(imageId string, tenantId string, customerId string, name string, description string, url string, sizeMb float32, uploadedSizeMb float32, osType string, version string, format string, status string, errorMessage string, standardImage bool, creationDate time.Time, lastModifiedDate time.Time, tags []TagResponse1) *ListImageResponseData { this := ListImageResponseData{} this.ImageId = imageId this.TenantId = tenantId @@ -473,9 +473,9 @@ func (o *ListImageResponseData) SetLastModifiedDate(v time.Time) { } // GetTags returns the Tags field value -func (o *ListImageResponseData) GetTags() []TagResponse { +func (o *ListImageResponseData) GetTags() []TagResponse1 { if o == nil { - var ret []TagResponse + var ret []TagResponse1 return ret } @@ -484,7 +484,7 @@ func (o *ListImageResponseData) GetTags() []TagResponse { // GetTagsOk returns a tuple with the Tags field value // and a boolean to check if the value has been set. -func (o *ListImageResponseData) GetTagsOk() (*[]TagResponse, bool) { +func (o *ListImageResponseData) GetTagsOk() (*[]TagResponse1, bool) { if o == nil { return nil, false } @@ -492,7 +492,7 @@ func (o *ListImageResponseData) GetTagsOk() (*[]TagResponse, bool) { } // SetTags sets field value -func (o *ListImageResponseData) SetTags(v []TagResponse) { +func (o *ListImageResponseData) SetTags(v []TagResponse1) { o.Tags = v } diff --git a/openapi/model_list_instances_response_data.go b/openapi/model_list_instances_response_data.go index 5f1c114..d0e2d71 100644 --- a/openapi/model_list_instances_response_data.go +++ b/openapi/model_list_instances_response_data.go @@ -64,6 +64,8 @@ type ListInstancesResponseData struct { ErrorMessage *string `json:"errorMessage,omitempty"` // Instance's category depending on Product Id ProductType string `json:"productType"` + // Instance's Product Name + ProductName string `json:"productName"` // Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. DefaultUser *string `json:"defaultUser,omitempty"` } @@ -72,7 +74,7 @@ type ListInstancesResponseData struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewListInstancesResponseData(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string) *ListInstancesResponseData { +func NewListInstancesResponseData(tenantId string, customerId string, additionalIps []AdditionalIp, name string, displayName string, instanceId int64, dataCenter string, region string, regionName string, productId string, imageId string, ipConfig IpConfig, macAddress string, ramMb float32, cpuCores int64, osType string, diskMb float32, sshKeys []int64, createdDate time.Time, cancelDate string, status InstanceStatus, vHostId int64, addOns []AddOnResponse, productType string, productName string) *ListInstancesResponseData { this := ListInstancesResponseData{} this.TenantId = tenantId this.CustomerId = customerId @@ -98,6 +100,7 @@ func NewListInstancesResponseData(tenantId string, customerId string, additional this.VHostId = vHostId this.AddOns = addOns this.ProductType = productType + this.ProductName = productName return &this } @@ -717,6 +720,30 @@ func (o *ListInstancesResponseData) SetProductType(v string) { o.ProductType = v } +// GetProductName returns the ProductName field value +func (o *ListInstancesResponseData) GetProductName() string { + if o == nil { + var ret string + return ret + } + + return o.ProductName +} + +// GetProductNameOk returns a tuple with the ProductName field value +// and a boolean to check if the value has been set. +func (o *ListInstancesResponseData) GetProductNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductName, true +} + +// SetProductName sets field value +func (o *ListInstancesResponseData) SetProductName(v string) { + o.ProductName = v +} + // GetDefaultUser returns the DefaultUser field value if set, zero value otherwise. func (o *ListInstancesResponseData) GetDefaultUser() string { if o == nil || o.DefaultUser == nil { @@ -826,6 +853,9 @@ func (o ListInstancesResponseData) MarshalJSON() ([]byte, error) { if true { toSerialize["productType"] = o.ProductType } + if true { + toSerialize["productName"] = o.ProductName + } if o.DefaultUser != nil { toSerialize["defaultUser"] = o.DefaultUser } diff --git a/openapi/model_list_tag_response.go b/openapi/model_list_tag_response.go index e384b90..f02347c 100644 --- a/openapi/model_list_tag_response.go +++ b/openapi/model_list_tag_response.go @@ -19,7 +19,7 @@ import ( type ListTagResponse struct { // Data about pagination like how many results, pages, page size. Pagination PaginationMeta `json:"_pagination"` - Data []TagResponse1 `json:"data"` + Data []TagResponse `json:"data"` Links Links `json:"_links"` } @@ -27,7 +27,7 @@ type ListTagResponse struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewListTagResponse(pagination PaginationMeta, data []TagResponse1, links Links) *ListTagResponse { +func NewListTagResponse(pagination PaginationMeta, data []TagResponse, links Links) *ListTagResponse { this := ListTagResponse{} this.Pagination = pagination this.Data = data @@ -68,9 +68,9 @@ func (o *ListTagResponse) SetPagination(v PaginationMeta) { } // GetData returns the Data field value -func (o *ListTagResponse) GetData() []TagResponse1 { +func (o *ListTagResponse) GetData() []TagResponse { if o == nil { - var ret []TagResponse1 + var ret []TagResponse return ret } @@ -79,7 +79,7 @@ func (o *ListTagResponse) GetData() []TagResponse1 { // GetDataOk returns a tuple with the Data field value // and a boolean to check if the value has been set. -func (o *ListTagResponse) GetDataOk() (*[]TagResponse1, bool) { +func (o *ListTagResponse) GetDataOk() (*[]TagResponse, bool) { if o == nil { return nil, false } @@ -87,7 +87,7 @@ func (o *ListTagResponse) GetDataOk() (*[]TagResponse1, bool) { } // SetData sets field value -func (o *ListTagResponse) SetData(v []TagResponse1) { +func (o *ListTagResponse) SetData(v []TagResponse) { o.Data = v } diff --git a/openapi/model_list_ticket_metadata_response.go b/openapi/model_list_ticket_metadata_response.go new file mode 100644 index 0000000..bc04943 --- /dev/null +++ b/openapi/model_list_ticket_metadata_response.go @@ -0,0 +1,138 @@ +/* +Contabo API + +# Introduction Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples. Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and Installation instructions.](https://github.com/contabo/cntb) ## Product documentation If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/). ## Getting Started In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details)) You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool. ### Using the API directly #### Via `curl` for Linux/Unix like systems This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values. ```sh CLIENT_ID= CLIENT_SECRET= API_USER= API_PASSWORD='' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ``` #### Via `PowerShell` for Windows Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values. ```powershell $client_id='' $client_secret='' $api_user='' $api_password='' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ``` ### Using the Contabo API via the `cntb` CLI tool 1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github.com/contabo/cntb) 2. Unzip the downloaded file 3. You might move the executable to any location on your disk. You may update your `PATH` environment variable for easier invocation. 4. Configure it once to use your credentials ```sh cntb config set-credentials --oauth2-clientid= --oauth2-client-secret= --oauth2-user= --oauth2-password='' ``` 5. Use the CLI ```sh # get list of your instances cntb get instances # help cntb help ``` ## API Overview ### [Compute Management](#tag/Instances) The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping) of VPS and VDS (please note that Storage VPS are not supported via API or CLI) as well as managing snapshots and custom images. It also offers you to take advantage of [cloud-init](https://cloud-init.io/) at least on our default / standard images (for custom images you'll need to provide cloud-init support packages). The API offers provisioning of cloud-init scripts via the `user_data` field. Custom images must be provided in `.qcow2` or `.iso` format. This gives you even more flexibility for setting up your environment. ### [Object Storage](#tag/Object-Storages) The Object Storage API allows you to order, upgrade, cancel and control the auto-scaling feature for [S3](https://en.wikipedia.org/wiki/Amazon_S3) compatible object storage. You may also get some usage statistics. You can only buy one object storage per location. In case you need more storage space in a location you can purchase more space or enable the auto-scaling feature to purchase automatically more storage space up to the specified monthly limit. Please note that this is not the S3 compatible API. It is not documented here. The S3 compatible API needs to be used with the corresponding credentials, namely an `access_key` and `secret_key`. Those can be retrieved by invoking the User Management API. All purchased object storages in different locations share the same credentials. You are free to use S3 compatible tools like [`aws`](https://aws.amazon.com/cli/) cli or similar. ### [Private Networking](#tag/Private-Networks) The Private Networking API allows you to manage private networks / Virtual Private Clouds (VPC) for your Cloud VPS and VDS (please note that Storage VPS are not supported via API or CLI). Having a private network allows the associated instances to have a private and direct network connection. The traffic won't leave the data center and cannot be accessed by any other instance. With this feature you can create multi layer systems, e.g. having a database server being only accessible from your application servers in one private network and keep the database replication in a second, separate network. This increases the speed as the traffic is NOT routed to the internet and also security as the traffic is within it's own secured VLAN. Adding a Cloud VPS or VDS to a private network requires a reinstallation to make sure that all relevant parts for private networking are in place. When adding the same instance to another private network it will require a restart in order to make additional virtual network interface cards (NICs) available. Please note that for each instance being part of one or several private networks a payed add-on is required. You can automatically purchase it via the Compute Management API. ### [Secrets Management](#tag/Secrets) You can optionally save your passwords or public ssh keys using the Secrets Management API. You are not required to use it there will be no functional disadvantages. By using that API you can easily reuse you public ssh keys when setting up different servers without the need to look them up every time. It can also be used to allow Contabo Supporters to access your machine without sending the passwords via potentially unsecure emails. ### [User Management](#tag/Users) If you need to allow other persons or automation scripts to access specific API endpoints resp. resources the User Management API comes into play. With that API you are able to manage users having possibly restricted access. You are free to define those restrictions to fit your needs. So beside an arbitrary number of users you basically define any number of so called `roles`. Roles allows access and must be one of the following types: * `apiPermission` This allows you to specify a restriction to certain functions of an API by allowing control over POST (=Create), GET (=Read), PUT/PATCH (=Update) and DELETE (=Delete) methods for each API endpoint (URL) individually. * `resourcePermission` In order to restrict access to specific resources create a role with `resourcePermission` type by specifying any number of [tags](#tag-management). These tags need to be assigned to resources for them to take effect. E.g. a tag could be assigned to several compute resources. So that a user with that role (and of course access to the API endpoints via `apiPermission` role type) could only access those compute resources. The `roles` are then assigned to a `user`. You can assign one or several roles regardless of the role's type. Of course you could also assign a user `admin` privileges without specifying any roles. ### [Tag Management](#tag/Tags) The Tag Management API allows you to manage your tags in order to organize your resources in a more convenient way. Simply assign a tag to resources like a compute resource to manage them.The assignments of tags to resources will also enable you to control access to these specific resources to users via the [User Management API](#user-management). For convenience reasons you might choose a color for tag. The Customer Control Panel will use that color to display the tags. ## Requests The Contabo API supports HTTP requests like mentioned below. Not every endpoint supports all methods. The allowed methods are listed within this documentation. Method | Description --- | --- GET | To retrieve information about a resource, use the GET method.
The data is returned as a JSON object. GET methods are read-only and do not affect any resources. POST | Issue a POST method to create a new object. Include all needed attributes in the request body encoded as JSON. PATCH | Some resources support partial modification with PATCH,
which modifies specific attributes without updating the entire object representation. PUT | Use the PUT method to update information about a resource.
PUT will set new values on the item without regard to their current values. DELETE | Use the DELETE method to destroy a resource in your account.
If it is not found, the operation will return a 4xx error and an appropriate message. ## Responses Usually the Contabo API should respond to your requests. The data returned is in [JSON](https://www.json.org/) format allowing easy processing in any programming language or tools. As common for HTTP requests you will get back a so called HTTP status code. This gives you overall information about success or error. The following table lists common HTTP status codes. Please note that the description of the endpoints and methods are not listing all possibly status codes in detail as they are generic. Only special return codes with their resp. response data are explicitly listed. Response Code | Description --- | --- 200 | The response contains your requested information. 201 | Your request was accepted. The resource was created. 204 | Your request succeeded, there is no additional information returned. 400 | Your request was malformed. 401 | You did not supply valid authentication credentials. 402 | Request refused as it requires additional payed service. 403 | You are not allowed to perform the request. 404 | No results were found for your request or resource does not exist. 409 | Conflict with resources. For example violation of unique data constraints detected when trying to create or change resources. 429 | Rate-limit reached. Please wait for some time before doing more requests. 500 | We were unable to perform the request due to server-side problems. In such cases please retry or contact the support. Not every endpoint returns data. For example DELETE requests usually don't return any data. All others do return data. For easy handling the return values consists of metadata denoted with and underscore (\"_\") like `_links` or `_pagination`. The actual data is returned in a field called `data`. For convenience reasons this `data` field is always returned as an array even if it consists of only one single element. Some general details about Contabo API from [Contabo](https://contabo.com). + +API version: 1.0.0 +Contact: support@contabo.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListTicketMetadataResponse struct for ListTicketMetadataResponse +type ListTicketMetadataResponse struct { + Data []MetadataType `json:"data"` + Links SelfLinks `json:"_links"` +} + +// NewListTicketMetadataResponse instantiates a new ListTicketMetadataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListTicketMetadataResponse(data []MetadataType, links SelfLinks) *ListTicketMetadataResponse { + this := ListTicketMetadataResponse{} + this.Data = data + this.Links = links + return &this +} + +// NewListTicketMetadataResponseWithDefaults instantiates a new ListTicketMetadataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListTicketMetadataResponseWithDefaults() *ListTicketMetadataResponse { + this := ListTicketMetadataResponse{} + return &this +} + +// GetData returns the Data field value +func (o *ListTicketMetadataResponse) GetData() []MetadataType { + if o == nil { + var ret []MetadataType + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ListTicketMetadataResponse) GetDataOk() (*[]MetadataType, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ListTicketMetadataResponse) SetData(v []MetadataType) { + o.Data = v +} + +// GetLinks returns the Links field value +func (o *ListTicketMetadataResponse) GetLinks() SelfLinks { + if o == nil { + var ret SelfLinks + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *ListTicketMetadataResponse) GetLinksOk() (*SelfLinks, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *ListTicketMetadataResponse) SetLinks(v SelfLinks) { + o.Links = v +} + +func (o ListTicketMetadataResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + if true { + toSerialize["_links"] = o.Links + } + return json.Marshal(toSerialize) +} + +type NullableListTicketMetadataResponse struct { + value *ListTicketMetadataResponse + isSet bool +} + +func (v NullableListTicketMetadataResponse) Get() *ListTicketMetadataResponse { + return v.value +} + +func (v *NullableListTicketMetadataResponse) Set(val *ListTicketMetadataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListTicketMetadataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListTicketMetadataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListTicketMetadataResponse(val *ListTicketMetadataResponse) *NullableListTicketMetadataResponse { + return &NullableListTicketMetadataResponse{value: val, isSet: true} +} + +func (v NullableListTicketMetadataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListTicketMetadataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/openapi/model_metadata_type.go b/openapi/model_metadata_type.go new file mode 100644 index 0000000..63eadec --- /dev/null +++ b/openapi/model_metadata_type.go @@ -0,0 +1,200 @@ +/* +Contabo API + +# Introduction Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples. Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and Installation instructions.](https://github.com/contabo/cntb) ## Product documentation If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/). ## Getting Started In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details)) You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool. ### Using the API directly #### Via `curl` for Linux/Unix like systems This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values. ```sh CLIENT_ID= CLIENT_SECRET= API_USER= API_PASSWORD='' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ``` #### Via `PowerShell` for Windows Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values. ```powershell $client_id='' $client_secret='' $api_user='' $api_password='' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ``` ### Using the Contabo API via the `cntb` CLI tool 1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github.com/contabo/cntb) 2. Unzip the downloaded file 3. You might move the executable to any location on your disk. You may update your `PATH` environment variable for easier invocation. 4. Configure it once to use your credentials ```sh cntb config set-credentials --oauth2-clientid= --oauth2-client-secret= --oauth2-user= --oauth2-password='' ``` 5. Use the CLI ```sh # get list of your instances cntb get instances # help cntb help ``` ## API Overview ### [Compute Management](#tag/Instances) The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping) of VPS and VDS (please note that Storage VPS are not supported via API or CLI) as well as managing snapshots and custom images. It also offers you to take advantage of [cloud-init](https://cloud-init.io/) at least on our default / standard images (for custom images you'll need to provide cloud-init support packages). The API offers provisioning of cloud-init scripts via the `user_data` field. Custom images must be provided in `.qcow2` or `.iso` format. This gives you even more flexibility for setting up your environment. ### [Object Storage](#tag/Object-Storages) The Object Storage API allows you to order, upgrade, cancel and control the auto-scaling feature for [S3](https://en.wikipedia.org/wiki/Amazon_S3) compatible object storage. You may also get some usage statistics. You can only buy one object storage per location. In case you need more storage space in a location you can purchase more space or enable the auto-scaling feature to purchase automatically more storage space up to the specified monthly limit. Please note that this is not the S3 compatible API. It is not documented here. The S3 compatible API needs to be used with the corresponding credentials, namely an `access_key` and `secret_key`. Those can be retrieved by invoking the User Management API. All purchased object storages in different locations share the same credentials. You are free to use S3 compatible tools like [`aws`](https://aws.amazon.com/cli/) cli or similar. ### [Private Networking](#tag/Private-Networks) The Private Networking API allows you to manage private networks / Virtual Private Clouds (VPC) for your Cloud VPS and VDS (please note that Storage VPS are not supported via API or CLI). Having a private network allows the associated instances to have a private and direct network connection. The traffic won't leave the data center and cannot be accessed by any other instance. With this feature you can create multi layer systems, e.g. having a database server being only accessible from your application servers in one private network and keep the database replication in a second, separate network. This increases the speed as the traffic is NOT routed to the internet and also security as the traffic is within it's own secured VLAN. Adding a Cloud VPS or VDS to a private network requires a reinstallation to make sure that all relevant parts for private networking are in place. When adding the same instance to another private network it will require a restart in order to make additional virtual network interface cards (NICs) available. Please note that for each instance being part of one or several private networks a payed add-on is required. You can automatically purchase it via the Compute Management API. ### [Secrets Management](#tag/Secrets) You can optionally save your passwords or public ssh keys using the Secrets Management API. You are not required to use it there will be no functional disadvantages. By using that API you can easily reuse you public ssh keys when setting up different servers without the need to look them up every time. It can also be used to allow Contabo Supporters to access your machine without sending the passwords via potentially unsecure emails. ### [User Management](#tag/Users) If you need to allow other persons or automation scripts to access specific API endpoints resp. resources the User Management API comes into play. With that API you are able to manage users having possibly restricted access. You are free to define those restrictions to fit your needs. So beside an arbitrary number of users you basically define any number of so called `roles`. Roles allows access and must be one of the following types: * `apiPermission` This allows you to specify a restriction to certain functions of an API by allowing control over POST (=Create), GET (=Read), PUT/PATCH (=Update) and DELETE (=Delete) methods for each API endpoint (URL) individually. * `resourcePermission` In order to restrict access to specific resources create a role with `resourcePermission` type by specifying any number of [tags](#tag-management). These tags need to be assigned to resources for them to take effect. E.g. a tag could be assigned to several compute resources. So that a user with that role (and of course access to the API endpoints via `apiPermission` role type) could only access those compute resources. The `roles` are then assigned to a `user`. You can assign one or several roles regardless of the role's type. Of course you could also assign a user `admin` privileges without specifying any roles. ### [Tag Management](#tag/Tags) The Tag Management API allows you to manage your tags in order to organize your resources in a more convenient way. Simply assign a tag to resources like a compute resource to manage them.The assignments of tags to resources will also enable you to control access to these specific resources to users via the [User Management API](#user-management). For convenience reasons you might choose a color for tag. The Customer Control Panel will use that color to display the tags. ## Requests The Contabo API supports HTTP requests like mentioned below. Not every endpoint supports all methods. The allowed methods are listed within this documentation. Method | Description --- | --- GET | To retrieve information about a resource, use the GET method.
The data is returned as a JSON object. GET methods are read-only and do not affect any resources. POST | Issue a POST method to create a new object. Include all needed attributes in the request body encoded as JSON. PATCH | Some resources support partial modification with PATCH,
which modifies specific attributes without updating the entire object representation. PUT | Use the PUT method to update information about a resource.
PUT will set new values on the item without regard to their current values. DELETE | Use the DELETE method to destroy a resource in your account.
If it is not found, the operation will return a 4xx error and an appropriate message. ## Responses Usually the Contabo API should respond to your requests. The data returned is in [JSON](https://www.json.org/) format allowing easy processing in any programming language or tools. As common for HTTP requests you will get back a so called HTTP status code. This gives you overall information about success or error. The following table lists common HTTP status codes. Please note that the description of the endpoints and methods are not listing all possibly status codes in detail as they are generic. Only special return codes with their resp. response data are explicitly listed. Response Code | Description --- | --- 200 | The response contains your requested information. 201 | Your request was accepted. The resource was created. 204 | Your request succeeded, there is no additional information returned. 400 | Your request was malformed. 401 | You did not supply valid authentication credentials. 402 | Request refused as it requires additional payed service. 403 | You are not allowed to perform the request. 404 | No results were found for your request or resource does not exist. 409 | Conflict with resources. For example violation of unique data constraints detected when trying to create or change resources. 429 | Rate-limit reached. Please wait for some time before doing more requests. 500 | We were unable to perform the request due to server-side problems. In such cases please retry or contact the support. Not every endpoint returns data. For example DELETE requests usually don't return any data. All others do return data. For easy handling the return values consists of metadata denoted with and underscore (\"_\") like `_links` or `_pagination`. The actual data is returned in a field called `data`. For convenience reasons this `data` field is always returned as an array even if it consists of only one single element. Some general details about Contabo API from [Contabo](https://contabo.com). + +API version: 1.0.0 +Contact: support@contabo.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// MetadataType struct for MetadataType +type MetadataType struct { + // Your customer tenant id + TenantId string `json:"tenantId"` + // Your customer number + CustomerId string `json:"customerId"` + // Type name + Name string `json:"name"` + // Available choices + AvailableChoices []string `json:"availableChoices"` +} + +// NewMetadataType instantiates a new MetadataType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMetadataType(tenantId string, customerId string, name string, availableChoices []string) *MetadataType { + this := MetadataType{} + this.TenantId = tenantId + this.CustomerId = customerId + this.Name = name + this.AvailableChoices = availableChoices + return &this +} + +// NewMetadataTypeWithDefaults instantiates a new MetadataType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMetadataTypeWithDefaults() *MetadataType { + this := MetadataType{} + return &this +} + +// GetTenantId returns the TenantId field value +func (o *MetadataType) GetTenantId() string { + if o == nil { + var ret string + return ret + } + + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *MetadataType) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value +func (o *MetadataType) SetTenantId(v string) { + o.TenantId = v +} + +// GetCustomerId returns the CustomerId field value +func (o *MetadataType) GetCustomerId() string { + if o == nil { + var ret string + return ret + } + + return o.CustomerId +} + +// GetCustomerIdOk returns a tuple with the CustomerId field value +// and a boolean to check if the value has been set. +func (o *MetadataType) GetCustomerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomerId, true +} + +// SetCustomerId sets field value +func (o *MetadataType) SetCustomerId(v string) { + o.CustomerId = v +} + +// GetName returns the Name field value +func (o *MetadataType) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MetadataType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MetadataType) SetName(v string) { + o.Name = v +} + +// GetAvailableChoices returns the AvailableChoices field value +func (o *MetadataType) GetAvailableChoices() []string { + if o == nil { + var ret []string + return ret + } + + return o.AvailableChoices +} + +// GetAvailableChoicesOk returns a tuple with the AvailableChoices field value +// and a boolean to check if the value has been set. +func (o *MetadataType) GetAvailableChoicesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.AvailableChoices, true +} + +// SetAvailableChoices sets field value +func (o *MetadataType) SetAvailableChoices(v []string) { + o.AvailableChoices = v +} + +func (o MetadataType) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["tenantId"] = o.TenantId + } + if true { + toSerialize["customerId"] = o.CustomerId + } + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["availableChoices"] = o.AvailableChoices + } + return json.Marshal(toSerialize) +} + +type NullableMetadataType struct { + value *MetadataType + isSet bool +} + +func (v NullableMetadataType) Get() *MetadataType { + return v.value +} + +func (v *NullableMetadataType) Set(val *MetadataType) { + v.value = val + v.isSet = true +} + +func (v NullableMetadataType) IsSet() bool { + return v.isSet +} + +func (v *NullableMetadataType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetadataType(val *MetadataType) *NullableMetadataType { + return &NullableMetadataType{value: val, isSet: true} +} + +func (v NullableMetadataType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetadataType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/openapi/model_tag_response.go b/openapi/model_tag_response.go index fd9db52..ff30dee 100644 --- a/openapi/model_tag_response.go +++ b/openapi/model_tag_response.go @@ -17,20 +17,29 @@ import ( // TagResponse struct for TagResponse type TagResponse struct { + // Your customer tenant id + TenantId string `json:"tenantId"` + // Your customer number + CustomerId string `json:"customerId"` // Tag's id TagId float32 `json:"tagId"` // Tag's name - TagName string `json:"tagName"` + Name string `json:"name"` + // Tag's color + Color string `json:"color"` } // NewTagResponse instantiates a new TagResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTagResponse(tagId float32, tagName string) *TagResponse { +func NewTagResponse(tenantId string, customerId string, tagId float32, name string, color string) *TagResponse { this := TagResponse{} + this.TenantId = tenantId + this.CustomerId = customerId this.TagId = tagId - this.TagName = tagName + this.Name = name + this.Color = color return &this } @@ -42,6 +51,54 @@ func NewTagResponseWithDefaults() *TagResponse { return &this } +// GetTenantId returns the TenantId field value +func (o *TagResponse) GetTenantId() string { + if o == nil { + var ret string + return ret + } + + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *TagResponse) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value +func (o *TagResponse) SetTenantId(v string) { + o.TenantId = v +} + +// GetCustomerId returns the CustomerId field value +func (o *TagResponse) GetCustomerId() string { + if o == nil { + var ret string + return ret + } + + return o.CustomerId +} + +// GetCustomerIdOk returns a tuple with the CustomerId field value +// and a boolean to check if the value has been set. +func (o *TagResponse) GetCustomerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomerId, true +} + +// SetCustomerId sets field value +func (o *TagResponse) SetCustomerId(v string) { + o.CustomerId = v +} + // GetTagId returns the TagId field value func (o *TagResponse) GetTagId() float32 { if o == nil { @@ -66,37 +123,70 @@ func (o *TagResponse) SetTagId(v float32) { o.TagId = v } -// GetTagName returns the TagName field value -func (o *TagResponse) GetTagName() string { +// GetName returns the Name field value +func (o *TagResponse) GetName() string { if o == nil { var ret string return ret } - return o.TagName + return o.Name } -// GetTagNameOk returns a tuple with the TagName field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *TagResponse) GetTagNameOk() (*string, bool) { +func (o *TagResponse) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return &o.TagName, true + return &o.Name, true } -// SetTagName sets field value -func (o *TagResponse) SetTagName(v string) { - o.TagName = v +// SetName sets field value +func (o *TagResponse) SetName(v string) { + o.Name = v +} + +// GetColor returns the Color field value +func (o *TagResponse) GetColor() string { + if o == nil { + var ret string + return ret + } + + return o.Color +} + +// GetColorOk returns a tuple with the Color field value +// and a boolean to check if the value has been set. +func (o *TagResponse) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Color, true +} + +// SetColor sets field value +func (o *TagResponse) SetColor(v string) { + o.Color = v } func (o TagResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if true { + toSerialize["tenantId"] = o.TenantId + } + if true { + toSerialize["customerId"] = o.CustomerId + } if true { toSerialize["tagId"] = o.TagId } if true { - toSerialize["tagName"] = o.TagName + toSerialize["name"] = o.Name + } + if true { + toSerialize["color"] = o.Color } return json.Marshal(toSerialize) } diff --git a/openapi/model_tag_response1.go b/openapi/model_tag_response1.go index b7532d3..b789550 100644 --- a/openapi/model_tag_response1.go +++ b/openapi/model_tag_response1.go @@ -17,29 +17,20 @@ import ( // TagResponse1 struct for TagResponse1 type TagResponse1 struct { - // Your customer tenant id - TenantId string `json:"tenantId"` - // Your customer number - CustomerId string `json:"customerId"` // Tag's id TagId float32 `json:"tagId"` // Tag's name - Name string `json:"name"` - // Tag's color - Color string `json:"color"` + TagName string `json:"tagName"` } // NewTagResponse1 instantiates a new TagResponse1 object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTagResponse1(tenantId string, customerId string, tagId float32, name string, color string) *TagResponse1 { +func NewTagResponse1(tagId float32, tagName string) *TagResponse1 { this := TagResponse1{} - this.TenantId = tenantId - this.CustomerId = customerId this.TagId = tagId - this.Name = name - this.Color = color + this.TagName = tagName return &this } @@ -51,54 +42,6 @@ func NewTagResponse1WithDefaults() *TagResponse1 { return &this } -// GetTenantId returns the TenantId field value -func (o *TagResponse1) GetTenantId() string { - if o == nil { - var ret string - return ret - } - - return o.TenantId -} - -// GetTenantIdOk returns a tuple with the TenantId field value -// and a boolean to check if the value has been set. -func (o *TagResponse1) GetTenantIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TenantId, true -} - -// SetTenantId sets field value -func (o *TagResponse1) SetTenantId(v string) { - o.TenantId = v -} - -// GetCustomerId returns the CustomerId field value -func (o *TagResponse1) GetCustomerId() string { - if o == nil { - var ret string - return ret - } - - return o.CustomerId -} - -// GetCustomerIdOk returns a tuple with the CustomerId field value -// and a boolean to check if the value has been set. -func (o *TagResponse1) GetCustomerIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CustomerId, true -} - -// SetCustomerId sets field value -func (o *TagResponse1) SetCustomerId(v string) { - o.CustomerId = v -} - // GetTagId returns the TagId field value func (o *TagResponse1) GetTagId() float32 { if o == nil { @@ -123,70 +66,37 @@ func (o *TagResponse1) SetTagId(v float32) { o.TagId = v } -// GetName returns the Name field value -func (o *TagResponse1) GetName() string { +// GetTagName returns the TagName field value +func (o *TagResponse1) GetTagName() string { if o == nil { var ret string return ret } - return o.Name + return o.TagName } -// GetNameOk returns a tuple with the Name field value +// GetTagNameOk returns a tuple with the TagName field value // and a boolean to check if the value has been set. -func (o *TagResponse1) GetNameOk() (*string, bool) { +func (o *TagResponse1) GetTagNameOk() (*string, bool) { if o == nil { return nil, false } - return &o.Name, true + return &o.TagName, true } -// SetName sets field value -func (o *TagResponse1) SetName(v string) { - o.Name = v -} - -// GetColor returns the Color field value -func (o *TagResponse1) GetColor() string { - if o == nil { - var ret string - return ret - } - - return o.Color -} - -// GetColorOk returns a tuple with the Color field value -// and a boolean to check if the value has been set. -func (o *TagResponse1) GetColorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Color, true -} - -// SetColor sets field value -func (o *TagResponse1) SetColor(v string) { - o.Color = v +// SetTagName sets field value +func (o *TagResponse1) SetTagName(v string) { + o.TagName = v } func (o TagResponse1) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["tenantId"] = o.TenantId - } - if true { - toSerialize["customerId"] = o.CustomerId - } if true { toSerialize["tagId"] = o.TagId } if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["color"] = o.Color + toSerialize["tagName"] = o.TagName } return json.Marshal(toSerialize) } diff --git a/openapi/model_ticket_create_request.go b/openapi/model_ticket_create_request.go new file mode 100644 index 0000000..762d08b --- /dev/null +++ b/openapi/model_ticket_create_request.go @@ -0,0 +1,274 @@ +/* +Contabo API + +# Introduction Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples. Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and Installation instructions.](https://github.com/contabo/cntb) ## Product documentation If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/). ## Getting Started In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details)) You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool. ### Using the API directly #### Via `curl` for Linux/Unix like systems This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values. ```sh CLIENT_ID= CLIENT_SECRET= API_USER= API_PASSWORD='' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ``` #### Via `PowerShell` for Windows Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values. ```powershell $client_id='' $client_secret='' $api_user='' $api_password='' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ``` ### Using the Contabo API via the `cntb` CLI tool 1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github.com/contabo/cntb) 2. Unzip the downloaded file 3. You might move the executable to any location on your disk. You may update your `PATH` environment variable for easier invocation. 4. Configure it once to use your credentials ```sh cntb config set-credentials --oauth2-clientid= --oauth2-client-secret= --oauth2-user= --oauth2-password='' ``` 5. Use the CLI ```sh # get list of your instances cntb get instances # help cntb help ``` ## API Overview ### [Compute Management](#tag/Instances) The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping) of VPS and VDS (please note that Storage VPS are not supported via API or CLI) as well as managing snapshots and custom images. It also offers you to take advantage of [cloud-init](https://cloud-init.io/) at least on our default / standard images (for custom images you'll need to provide cloud-init support packages). The API offers provisioning of cloud-init scripts via the `user_data` field. Custom images must be provided in `.qcow2` or `.iso` format. This gives you even more flexibility for setting up your environment. ### [Object Storage](#tag/Object-Storages) The Object Storage API allows you to order, upgrade, cancel and control the auto-scaling feature for [S3](https://en.wikipedia.org/wiki/Amazon_S3) compatible object storage. You may also get some usage statistics. You can only buy one object storage per location. In case you need more storage space in a location you can purchase more space or enable the auto-scaling feature to purchase automatically more storage space up to the specified monthly limit. Please note that this is not the S3 compatible API. It is not documented here. The S3 compatible API needs to be used with the corresponding credentials, namely an `access_key` and `secret_key`. Those can be retrieved by invoking the User Management API. All purchased object storages in different locations share the same credentials. You are free to use S3 compatible tools like [`aws`](https://aws.amazon.com/cli/) cli or similar. ### [Private Networking](#tag/Private-Networks) The Private Networking API allows you to manage private networks / Virtual Private Clouds (VPC) for your Cloud VPS and VDS (please note that Storage VPS are not supported via API or CLI). Having a private network allows the associated instances to have a private and direct network connection. The traffic won't leave the data center and cannot be accessed by any other instance. With this feature you can create multi layer systems, e.g. having a database server being only accessible from your application servers in one private network and keep the database replication in a second, separate network. This increases the speed as the traffic is NOT routed to the internet and also security as the traffic is within it's own secured VLAN. Adding a Cloud VPS or VDS to a private network requires a reinstallation to make sure that all relevant parts for private networking are in place. When adding the same instance to another private network it will require a restart in order to make additional virtual network interface cards (NICs) available. Please note that for each instance being part of one or several private networks a payed add-on is required. You can automatically purchase it via the Compute Management API. ### [Secrets Management](#tag/Secrets) You can optionally save your passwords or public ssh keys using the Secrets Management API. You are not required to use it there will be no functional disadvantages. By using that API you can easily reuse you public ssh keys when setting up different servers without the need to look them up every time. It can also be used to allow Contabo Supporters to access your machine without sending the passwords via potentially unsecure emails. ### [User Management](#tag/Users) If you need to allow other persons or automation scripts to access specific API endpoints resp. resources the User Management API comes into play. With that API you are able to manage users having possibly restricted access. You are free to define those restrictions to fit your needs. So beside an arbitrary number of users you basically define any number of so called `roles`. Roles allows access and must be one of the following types: * `apiPermission` This allows you to specify a restriction to certain functions of an API by allowing control over POST (=Create), GET (=Read), PUT/PATCH (=Update) and DELETE (=Delete) methods for each API endpoint (URL) individually. * `resourcePermission` In order to restrict access to specific resources create a role with `resourcePermission` type by specifying any number of [tags](#tag-management). These tags need to be assigned to resources for them to take effect. E.g. a tag could be assigned to several compute resources. So that a user with that role (and of course access to the API endpoints via `apiPermission` role type) could only access those compute resources. The `roles` are then assigned to a `user`. You can assign one or several roles regardless of the role's type. Of course you could also assign a user `admin` privileges without specifying any roles. ### [Tag Management](#tag/Tags) The Tag Management API allows you to manage your tags in order to organize your resources in a more convenient way. Simply assign a tag to resources like a compute resource to manage them.The assignments of tags to resources will also enable you to control access to these specific resources to users via the [User Management API](#user-management). For convenience reasons you might choose a color for tag. The Customer Control Panel will use that color to display the tags. ## Requests The Contabo API supports HTTP requests like mentioned below. Not every endpoint supports all methods. The allowed methods are listed within this documentation. Method | Description --- | --- GET | To retrieve information about a resource, use the GET method.
The data is returned as a JSON object. GET methods are read-only and do not affect any resources. POST | Issue a POST method to create a new object. Include all needed attributes in the request body encoded as JSON. PATCH | Some resources support partial modification with PATCH,
which modifies specific attributes without updating the entire object representation. PUT | Use the PUT method to update information about a resource.
PUT will set new values on the item without regard to their current values. DELETE | Use the DELETE method to destroy a resource in your account.
If it is not found, the operation will return a 4xx error and an appropriate message. ## Responses Usually the Contabo API should respond to your requests. The data returned is in [JSON](https://www.json.org/) format allowing easy processing in any programming language or tools. As common for HTTP requests you will get back a so called HTTP status code. This gives you overall information about success or error. The following table lists common HTTP status codes. Please note that the description of the endpoints and methods are not listing all possibly status codes in detail as they are generic. Only special return codes with their resp. response data are explicitly listed. Response Code | Description --- | --- 200 | The response contains your requested information. 201 | Your request was accepted. The resource was created. 204 | Your request succeeded, there is no additional information returned. 400 | Your request was malformed. 401 | You did not supply valid authentication credentials. 402 | Request refused as it requires additional payed service. 403 | You are not allowed to perform the request. 404 | No results were found for your request or resource does not exist. 409 | Conflict with resources. For example violation of unique data constraints detected when trying to create or change resources. 429 | Rate-limit reached. Please wait for some time before doing more requests. 500 | We were unable to perform the request due to server-side problems. In such cases please retry or contact the support. Not every endpoint returns data. For example DELETE requests usually don't return any data. All others do return data. For easy handling the return values consists of metadata denoted with and underscore (\"_\") like `_links` or `_pagination`. The actual data is returned in a field called `data`. For convenience reasons this `data` field is always returned as an array even if it consists of only one single element. Some general details about Contabo API from [Contabo](https://contabo.com). + +API version: 1.0.0 +Contact: support@contabo.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// TicketCreateRequest struct for TicketCreateRequest +type TicketCreateRequest struct { + // Ticket description + Description string `json:"description"` + // Ticket subject + Subject string `json:"subject"` + // Ticket tags + Tags *[]string `json:"tags,omitempty"` + // Ticket type + Type string `json:"type"` + // Ticket Group + AssignedGroup *string `json:"assignedGroup,omitempty"` + // Ticket Source + SourceClient string `json:"sourceClient"` +} + +// NewTicketCreateRequest instantiates a new TicketCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTicketCreateRequest(description string, subject string, type_ string, sourceClient string) *TicketCreateRequest { + this := TicketCreateRequest{} + this.Description = description + this.Subject = subject + this.Type = type_ + this.SourceClient = sourceClient + return &this +} + +// NewTicketCreateRequestWithDefaults instantiates a new TicketCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTicketCreateRequestWithDefaults() *TicketCreateRequest { + this := TicketCreateRequest{} + return &this +} + +// GetDescription returns the Description field value +func (o *TicketCreateRequest) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *TicketCreateRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *TicketCreateRequest) SetDescription(v string) { + o.Description = v +} + +// GetSubject returns the Subject field value +func (o *TicketCreateRequest) GetSubject() string { + if o == nil { + var ret string + return ret + } + + return o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value +// and a boolean to check if the value has been set. +func (o *TicketCreateRequest) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Subject, true +} + +// SetSubject sets field value +func (o *TicketCreateRequest) SetSubject(v string) { + o.Subject = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *TicketCreateRequest) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TicketCreateRequest) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *TicketCreateRequest) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *TicketCreateRequest) SetTags(v []string) { + o.Tags = &v +} + +// GetType returns the Type field value +func (o *TicketCreateRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TicketCreateRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TicketCreateRequest) SetType(v string) { + o.Type = v +} + +// GetAssignedGroup returns the AssignedGroup field value if set, zero value otherwise. +func (o *TicketCreateRequest) GetAssignedGroup() string { + if o == nil || o.AssignedGroup == nil { + var ret string + return ret + } + return *o.AssignedGroup +} + +// GetAssignedGroupOk returns a tuple with the AssignedGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TicketCreateRequest) GetAssignedGroupOk() (*string, bool) { + if o == nil || o.AssignedGroup == nil { + return nil, false + } + return o.AssignedGroup, true +} + +// HasAssignedGroup returns a boolean if a field has been set. +func (o *TicketCreateRequest) HasAssignedGroup() bool { + if o != nil && o.AssignedGroup != nil { + return true + } + + return false +} + +// SetAssignedGroup gets a reference to the given string and assigns it to the AssignedGroup field. +func (o *TicketCreateRequest) SetAssignedGroup(v string) { + o.AssignedGroup = &v +} + +// GetSourceClient returns the SourceClient field value +func (o *TicketCreateRequest) GetSourceClient() string { + if o == nil { + var ret string + return ret + } + + return o.SourceClient +} + +// GetSourceClientOk returns a tuple with the SourceClient field value +// and a boolean to check if the value has been set. +func (o *TicketCreateRequest) GetSourceClientOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceClient, true +} + +// SetSourceClient sets field value +func (o *TicketCreateRequest) SetSourceClient(v string) { + o.SourceClient = v +} + +func (o TicketCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["description"] = o.Description + } + if true { + toSerialize["subject"] = o.Subject + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if true { + toSerialize["type"] = o.Type + } + if o.AssignedGroup != nil { + toSerialize["assignedGroup"] = o.AssignedGroup + } + if true { + toSerialize["sourceClient"] = o.SourceClient + } + return json.Marshal(toSerialize) +} + +type NullableTicketCreateRequest struct { + value *TicketCreateRequest + isSet bool +} + +func (v NullableTicketCreateRequest) Get() *TicketCreateRequest { + return v.value +} + +func (v *NullableTicketCreateRequest) Set(val *TicketCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTicketCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTicketCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTicketCreateRequest(val *TicketCreateRequest) *NullableTicketCreateRequest { + return &NullableTicketCreateRequest{value: val, isSet: true} +} + +func (v NullableTicketCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTicketCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/openapi/model_ticket_create_response.go b/openapi/model_ticket_create_response.go new file mode 100644 index 0000000..0fc89c3 --- /dev/null +++ b/openapi/model_ticket_create_response.go @@ -0,0 +1,138 @@ +/* +Contabo API + +# Introduction Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples. Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and Installation instructions.](https://github.com/contabo/cntb) ## Product documentation If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/). ## Getting Started In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details)) You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool. ### Using the API directly #### Via `curl` for Linux/Unix like systems This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values. ```sh CLIENT_ID= CLIENT_SECRET= API_USER= API_PASSWORD='' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ``` #### Via `PowerShell` for Windows Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values. ```powershell $client_id='' $client_secret='' $api_user='' $api_password='' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ``` ### Using the Contabo API via the `cntb` CLI tool 1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github.com/contabo/cntb) 2. Unzip the downloaded file 3. You might move the executable to any location on your disk. You may update your `PATH` environment variable for easier invocation. 4. Configure it once to use your credentials ```sh cntb config set-credentials --oauth2-clientid= --oauth2-client-secret= --oauth2-user= --oauth2-password='' ``` 5. Use the CLI ```sh # get list of your instances cntb get instances # help cntb help ``` ## API Overview ### [Compute Management](#tag/Instances) The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping) of VPS and VDS (please note that Storage VPS are not supported via API or CLI) as well as managing snapshots and custom images. It also offers you to take advantage of [cloud-init](https://cloud-init.io/) at least on our default / standard images (for custom images you'll need to provide cloud-init support packages). The API offers provisioning of cloud-init scripts via the `user_data` field. Custom images must be provided in `.qcow2` or `.iso` format. This gives you even more flexibility for setting up your environment. ### [Object Storage](#tag/Object-Storages) The Object Storage API allows you to order, upgrade, cancel and control the auto-scaling feature for [S3](https://en.wikipedia.org/wiki/Amazon_S3) compatible object storage. You may also get some usage statistics. You can only buy one object storage per location. In case you need more storage space in a location you can purchase more space or enable the auto-scaling feature to purchase automatically more storage space up to the specified monthly limit. Please note that this is not the S3 compatible API. It is not documented here. The S3 compatible API needs to be used with the corresponding credentials, namely an `access_key` and `secret_key`. Those can be retrieved by invoking the User Management API. All purchased object storages in different locations share the same credentials. You are free to use S3 compatible tools like [`aws`](https://aws.amazon.com/cli/) cli or similar. ### [Private Networking](#tag/Private-Networks) The Private Networking API allows you to manage private networks / Virtual Private Clouds (VPC) for your Cloud VPS and VDS (please note that Storage VPS are not supported via API or CLI). Having a private network allows the associated instances to have a private and direct network connection. The traffic won't leave the data center and cannot be accessed by any other instance. With this feature you can create multi layer systems, e.g. having a database server being only accessible from your application servers in one private network and keep the database replication in a second, separate network. This increases the speed as the traffic is NOT routed to the internet and also security as the traffic is within it's own secured VLAN. Adding a Cloud VPS or VDS to a private network requires a reinstallation to make sure that all relevant parts for private networking are in place. When adding the same instance to another private network it will require a restart in order to make additional virtual network interface cards (NICs) available. Please note that for each instance being part of one or several private networks a payed add-on is required. You can automatically purchase it via the Compute Management API. ### [Secrets Management](#tag/Secrets) You can optionally save your passwords or public ssh keys using the Secrets Management API. You are not required to use it there will be no functional disadvantages. By using that API you can easily reuse you public ssh keys when setting up different servers without the need to look them up every time. It can also be used to allow Contabo Supporters to access your machine without sending the passwords via potentially unsecure emails. ### [User Management](#tag/Users) If you need to allow other persons or automation scripts to access specific API endpoints resp. resources the User Management API comes into play. With that API you are able to manage users having possibly restricted access. You are free to define those restrictions to fit your needs. So beside an arbitrary number of users you basically define any number of so called `roles`. Roles allows access and must be one of the following types: * `apiPermission` This allows you to specify a restriction to certain functions of an API by allowing control over POST (=Create), GET (=Read), PUT/PATCH (=Update) and DELETE (=Delete) methods for each API endpoint (URL) individually. * `resourcePermission` In order to restrict access to specific resources create a role with `resourcePermission` type by specifying any number of [tags](#tag-management). These tags need to be assigned to resources for them to take effect. E.g. a tag could be assigned to several compute resources. So that a user with that role (and of course access to the API endpoints via `apiPermission` role type) could only access those compute resources. The `roles` are then assigned to a `user`. You can assign one or several roles regardless of the role's type. Of course you could also assign a user `admin` privileges without specifying any roles. ### [Tag Management](#tag/Tags) The Tag Management API allows you to manage your tags in order to organize your resources in a more convenient way. Simply assign a tag to resources like a compute resource to manage them.The assignments of tags to resources will also enable you to control access to these specific resources to users via the [User Management API](#user-management). For convenience reasons you might choose a color for tag. The Customer Control Panel will use that color to display the tags. ## Requests The Contabo API supports HTTP requests like mentioned below. Not every endpoint supports all methods. The allowed methods are listed within this documentation. Method | Description --- | --- GET | To retrieve information about a resource, use the GET method.
The data is returned as a JSON object. GET methods are read-only and do not affect any resources. POST | Issue a POST method to create a new object. Include all needed attributes in the request body encoded as JSON. PATCH | Some resources support partial modification with PATCH,
which modifies specific attributes without updating the entire object representation. PUT | Use the PUT method to update information about a resource.
PUT will set new values on the item without regard to their current values. DELETE | Use the DELETE method to destroy a resource in your account.
If it is not found, the operation will return a 4xx error and an appropriate message. ## Responses Usually the Contabo API should respond to your requests. The data returned is in [JSON](https://www.json.org/) format allowing easy processing in any programming language or tools. As common for HTTP requests you will get back a so called HTTP status code. This gives you overall information about success or error. The following table lists common HTTP status codes. Please note that the description of the endpoints and methods are not listing all possibly status codes in detail as they are generic. Only special return codes with their resp. response data are explicitly listed. Response Code | Description --- | --- 200 | The response contains your requested information. 201 | Your request was accepted. The resource was created. 204 | Your request succeeded, there is no additional information returned. 400 | Your request was malformed. 401 | You did not supply valid authentication credentials. 402 | Request refused as it requires additional payed service. 403 | You are not allowed to perform the request. 404 | No results were found for your request or resource does not exist. 409 | Conflict with resources. For example violation of unique data constraints detected when trying to create or change resources. 429 | Rate-limit reached. Please wait for some time before doing more requests. 500 | We were unable to perform the request due to server-side problems. In such cases please retry or contact the support. Not every endpoint returns data. For example DELETE requests usually don't return any data. All others do return data. For easy handling the return values consists of metadata denoted with and underscore (\"_\") like `_links` or `_pagination`. The actual data is returned in a field called `data`. For convenience reasons this `data` field is always returned as an array even if it consists of only one single element. Some general details about Contabo API from [Contabo](https://contabo.com). + +API version: 1.0.0 +Contact: support@contabo.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// TicketCreateResponse struct for TicketCreateResponse +type TicketCreateResponse struct { + Data []TicketResponse `json:"data"` + Links SelfLinks `json:"_links"` +} + +// NewTicketCreateResponse instantiates a new TicketCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTicketCreateResponse(data []TicketResponse, links SelfLinks) *TicketCreateResponse { + this := TicketCreateResponse{} + this.Data = data + this.Links = links + return &this +} + +// NewTicketCreateResponseWithDefaults instantiates a new TicketCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTicketCreateResponseWithDefaults() *TicketCreateResponse { + this := TicketCreateResponse{} + return &this +} + +// GetData returns the Data field value +func (o *TicketCreateResponse) GetData() []TicketResponse { + if o == nil { + var ret []TicketResponse + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *TicketCreateResponse) GetDataOk() (*[]TicketResponse, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TicketCreateResponse) SetData(v []TicketResponse) { + o.Data = v +} + +// GetLinks returns the Links field value +func (o *TicketCreateResponse) GetLinks() SelfLinks { + if o == nil { + var ret SelfLinks + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *TicketCreateResponse) GetLinksOk() (*SelfLinks, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *TicketCreateResponse) SetLinks(v SelfLinks) { + o.Links = v +} + +func (o TicketCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + if true { + toSerialize["_links"] = o.Links + } + return json.Marshal(toSerialize) +} + +type NullableTicketCreateResponse struct { + value *TicketCreateResponse + isSet bool +} + +func (v NullableTicketCreateResponse) Get() *TicketCreateResponse { + return v.value +} + +func (v *NullableTicketCreateResponse) Set(val *TicketCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTicketCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTicketCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTicketCreateResponse(val *TicketCreateResponse) *NullableTicketCreateResponse { + return &NullableTicketCreateResponse{value: val, isSet: true} +} + +func (v NullableTicketCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTicketCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/openapi/model_ticket_response.go b/openapi/model_ticket_response.go new file mode 100644 index 0000000..adfaa4e --- /dev/null +++ b/openapi/model_ticket_response.go @@ -0,0 +1,470 @@ +/* +Contabo API + +# Introduction Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples. Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and Installation instructions.](https://github.com/contabo/cntb) ## Product documentation If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/). ## Getting Started In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details)) You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool. ### Using the API directly #### Via `curl` for Linux/Unix like systems This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values. ```sh CLIENT_ID= CLIENT_SECRET= API_USER= API_PASSWORD='' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ``` #### Via `PowerShell` for Windows Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values. ```powershell $client_id='' $client_secret='' $api_user='' $api_password='' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ``` ### Using the Contabo API via the `cntb` CLI tool 1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github.com/contabo/cntb) 2. Unzip the downloaded file 3. You might move the executable to any location on your disk. You may update your `PATH` environment variable for easier invocation. 4. Configure it once to use your credentials ```sh cntb config set-credentials --oauth2-clientid= --oauth2-client-secret= --oauth2-user= --oauth2-password='' ``` 5. Use the CLI ```sh # get list of your instances cntb get instances # help cntb help ``` ## API Overview ### [Compute Management](#tag/Instances) The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping) of VPS and VDS (please note that Storage VPS are not supported via API or CLI) as well as managing snapshots and custom images. It also offers you to take advantage of [cloud-init](https://cloud-init.io/) at least on our default / standard images (for custom images you'll need to provide cloud-init support packages). The API offers provisioning of cloud-init scripts via the `user_data` field. Custom images must be provided in `.qcow2` or `.iso` format. This gives you even more flexibility for setting up your environment. ### [Object Storage](#tag/Object-Storages) The Object Storage API allows you to order, upgrade, cancel and control the auto-scaling feature for [S3](https://en.wikipedia.org/wiki/Amazon_S3) compatible object storage. You may also get some usage statistics. You can only buy one object storage per location. In case you need more storage space in a location you can purchase more space or enable the auto-scaling feature to purchase automatically more storage space up to the specified monthly limit. Please note that this is not the S3 compatible API. It is not documented here. The S3 compatible API needs to be used with the corresponding credentials, namely an `access_key` and `secret_key`. Those can be retrieved by invoking the User Management API. All purchased object storages in different locations share the same credentials. You are free to use S3 compatible tools like [`aws`](https://aws.amazon.com/cli/) cli or similar. ### [Private Networking](#tag/Private-Networks) The Private Networking API allows you to manage private networks / Virtual Private Clouds (VPC) for your Cloud VPS and VDS (please note that Storage VPS are not supported via API or CLI). Having a private network allows the associated instances to have a private and direct network connection. The traffic won't leave the data center and cannot be accessed by any other instance. With this feature you can create multi layer systems, e.g. having a database server being only accessible from your application servers in one private network and keep the database replication in a second, separate network. This increases the speed as the traffic is NOT routed to the internet and also security as the traffic is within it's own secured VLAN. Adding a Cloud VPS or VDS to a private network requires a reinstallation to make sure that all relevant parts for private networking are in place. When adding the same instance to another private network it will require a restart in order to make additional virtual network interface cards (NICs) available. Please note that for each instance being part of one or several private networks a payed add-on is required. You can automatically purchase it via the Compute Management API. ### [Secrets Management](#tag/Secrets) You can optionally save your passwords or public ssh keys using the Secrets Management API. You are not required to use it there will be no functional disadvantages. By using that API you can easily reuse you public ssh keys when setting up different servers without the need to look them up every time. It can also be used to allow Contabo Supporters to access your machine without sending the passwords via potentially unsecure emails. ### [User Management](#tag/Users) If you need to allow other persons or automation scripts to access specific API endpoints resp. resources the User Management API comes into play. With that API you are able to manage users having possibly restricted access. You are free to define those restrictions to fit your needs. So beside an arbitrary number of users you basically define any number of so called `roles`. Roles allows access and must be one of the following types: * `apiPermission` This allows you to specify a restriction to certain functions of an API by allowing control over POST (=Create), GET (=Read), PUT/PATCH (=Update) and DELETE (=Delete) methods for each API endpoint (URL) individually. * `resourcePermission` In order to restrict access to specific resources create a role with `resourcePermission` type by specifying any number of [tags](#tag-management). These tags need to be assigned to resources for them to take effect. E.g. a tag could be assigned to several compute resources. So that a user with that role (and of course access to the API endpoints via `apiPermission` role type) could only access those compute resources. The `roles` are then assigned to a `user`. You can assign one or several roles regardless of the role's type. Of course you could also assign a user `admin` privileges without specifying any roles. ### [Tag Management](#tag/Tags) The Tag Management API allows you to manage your tags in order to organize your resources in a more convenient way. Simply assign a tag to resources like a compute resource to manage them.The assignments of tags to resources will also enable you to control access to these specific resources to users via the [User Management API](#user-management). For convenience reasons you might choose a color for tag. The Customer Control Panel will use that color to display the tags. ## Requests The Contabo API supports HTTP requests like mentioned below. Not every endpoint supports all methods. The allowed methods are listed within this documentation. Method | Description --- | --- GET | To retrieve information about a resource, use the GET method.
The data is returned as a JSON object. GET methods are read-only and do not affect any resources. POST | Issue a POST method to create a new object. Include all needed attributes in the request body encoded as JSON. PATCH | Some resources support partial modification with PATCH,
which modifies specific attributes without updating the entire object representation. PUT | Use the PUT method to update information about a resource.
PUT will set new values on the item without regard to their current values. DELETE | Use the DELETE method to destroy a resource in your account.
If it is not found, the operation will return a 4xx error and an appropriate message. ## Responses Usually the Contabo API should respond to your requests. The data returned is in [JSON](https://www.json.org/) format allowing easy processing in any programming language or tools. As common for HTTP requests you will get back a so called HTTP status code. This gives you overall information about success or error. The following table lists common HTTP status codes. Please note that the description of the endpoints and methods are not listing all possibly status codes in detail as they are generic. Only special return codes with their resp. response data are explicitly listed. Response Code | Description --- | --- 200 | The response contains your requested information. 201 | Your request was accepted. The resource was created. 204 | Your request succeeded, there is no additional information returned. 400 | Your request was malformed. 401 | You did not supply valid authentication credentials. 402 | Request refused as it requires additional payed service. 403 | You are not allowed to perform the request. 404 | No results were found for your request or resource does not exist. 409 | Conflict with resources. For example violation of unique data constraints detected when trying to create or change resources. 429 | Rate-limit reached. Please wait for some time before doing more requests. 500 | We were unable to perform the request due to server-side problems. In such cases please retry or contact the support. Not every endpoint returns data. For example DELETE requests usually don't return any data. All others do return data. For easy handling the return values consists of metadata denoted with and underscore (\"_\") like `_links` or `_pagination`. The actual data is returned in a field called `data`. For convenience reasons this `data` field is always returned as an array even if it consists of only one single element. Some general details about Contabo API from [Contabo](https://contabo.com). + +API version: 1.0.0 +Contact: support@contabo.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// TicketResponse struct for TicketResponse +type TicketResponse struct { + // Your customer tenant id + TenantId string `json:"tenantId"` + // Your customer number + CustomerId string `json:"customerId"` + // Ticket email + Email string `json:"email"` + // Ticket escalated flag + IsEscalated bool `json:"isEscalated"` + // Ticket priority + Priority string `json:"priority"` + // Ticket status + Status string `json:"status"` + // Ticket subject + Subject string `json:"subject"` + // Ticket description + Description string `json:"description"` + // Created Date + CreatedDate string `json:"createdDate"` + // Created Date + UpdatedDate string `json:"updatedDate"` + // Ticket tags + Tags []string `json:"tags"` + // Ticket ID + TicketId int64 `json:"ticketId"` + // Ticket type + Type string `json:"type"` +} + +// NewTicketResponse instantiates a new TicketResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTicketResponse(tenantId string, customerId string, email string, isEscalated bool, priority string, status string, subject string, description string, createdDate string, updatedDate string, tags []string, ticketId int64, type_ string) *TicketResponse { + this := TicketResponse{} + this.TenantId = tenantId + this.CustomerId = customerId + this.Email = email + this.IsEscalated = isEscalated + this.Priority = priority + this.Status = status + this.Subject = subject + this.Description = description + this.CreatedDate = createdDate + this.UpdatedDate = updatedDate + this.Tags = tags + this.TicketId = ticketId + this.Type = type_ + return &this +} + +// NewTicketResponseWithDefaults instantiates a new TicketResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTicketResponseWithDefaults() *TicketResponse { + this := TicketResponse{} + return &this +} + +// GetTenantId returns the TenantId field value +func (o *TicketResponse) GetTenantId() string { + if o == nil { + var ret string + return ret + } + + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value +func (o *TicketResponse) SetTenantId(v string) { + o.TenantId = v +} + +// GetCustomerId returns the CustomerId field value +func (o *TicketResponse) GetCustomerId() string { + if o == nil { + var ret string + return ret + } + + return o.CustomerId +} + +// GetCustomerIdOk returns a tuple with the CustomerId field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetCustomerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomerId, true +} + +// SetCustomerId sets field value +func (o *TicketResponse) SetCustomerId(v string) { + o.CustomerId = v +} + +// GetEmail returns the Email field value +func (o *TicketResponse) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *TicketResponse) SetEmail(v string) { + o.Email = v +} + +// GetIsEscalated returns the IsEscalated field value +func (o *TicketResponse) GetIsEscalated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsEscalated +} + +// GetIsEscalatedOk returns a tuple with the IsEscalated field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetIsEscalatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsEscalated, true +} + +// SetIsEscalated sets field value +func (o *TicketResponse) SetIsEscalated(v bool) { + o.IsEscalated = v +} + +// GetPriority returns the Priority field value +func (o *TicketResponse) GetPriority() string { + if o == nil { + var ret string + return ret + } + + return o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetPriorityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Priority, true +} + +// SetPriority sets field value +func (o *TicketResponse) SetPriority(v string) { + o.Priority = v +} + +// GetStatus returns the Status field value +func (o *TicketResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TicketResponse) SetStatus(v string) { + o.Status = v +} + +// GetSubject returns the Subject field value +func (o *TicketResponse) GetSubject() string { + if o == nil { + var ret string + return ret + } + + return o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Subject, true +} + +// SetSubject sets field value +func (o *TicketResponse) SetSubject(v string) { + o.Subject = v +} + +// GetDescription returns the Description field value +func (o *TicketResponse) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *TicketResponse) SetDescription(v string) { + o.Description = v +} + +// GetCreatedDate returns the CreatedDate field value +func (o *TicketResponse) GetCreatedDate() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedDate +} + +// GetCreatedDateOk returns a tuple with the CreatedDate field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetCreatedDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedDate, true +} + +// SetCreatedDate sets field value +func (o *TicketResponse) SetCreatedDate(v string) { + o.CreatedDate = v +} + +// GetUpdatedDate returns the UpdatedDate field value +func (o *TicketResponse) GetUpdatedDate() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedDate +} + +// GetUpdatedDateOk returns a tuple with the UpdatedDate field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetUpdatedDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedDate, true +} + +// SetUpdatedDate sets field value +func (o *TicketResponse) SetUpdatedDate(v string) { + o.UpdatedDate = v +} + +// GetTags returns the Tags field value +func (o *TicketResponse) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetTagsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.Tags, true +} + +// SetTags sets field value +func (o *TicketResponse) SetTags(v []string) { + o.Tags = v +} + +// GetTicketId returns the TicketId field value +func (o *TicketResponse) GetTicketId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TicketId +} + +// GetTicketIdOk returns a tuple with the TicketId field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetTicketIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TicketId, true +} + +// SetTicketId sets field value +func (o *TicketResponse) SetTicketId(v int64) { + o.TicketId = v +} + +// GetType returns the Type field value +func (o *TicketResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TicketResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TicketResponse) SetType(v string) { + o.Type = v +} + +func (o TicketResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["tenantId"] = o.TenantId + } + if true { + toSerialize["customerId"] = o.CustomerId + } + if true { + toSerialize["email"] = o.Email + } + if true { + toSerialize["isEscalated"] = o.IsEscalated + } + if true { + toSerialize["priority"] = o.Priority + } + if true { + toSerialize["status"] = o.Status + } + if true { + toSerialize["subject"] = o.Subject + } + if true { + toSerialize["description"] = o.Description + } + if true { + toSerialize["createdDate"] = o.CreatedDate + } + if true { + toSerialize["updatedDate"] = o.UpdatedDate + } + if true { + toSerialize["tags"] = o.Tags + } + if true { + toSerialize["ticketId"] = o.TicketId + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableTicketResponse struct { + value *TicketResponse + isSet bool +} + +func (v NullableTicketResponse) Get() *TicketResponse { + return v.value +} + +func (v *NullableTicketResponse) Set(val *TicketResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTicketResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTicketResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTicketResponse(val *TicketResponse) *NullableTicketResponse { + return &NullableTicketResponse{value: val, isSet: true} +} + +func (v NullableTicketResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTicketResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +