Google

Cloud OS Login API

You can use OS Login to manage access to your VM instances using IAM roles.

Developer tools#openapi#analytics#media

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

You can use OS Login to manage access to your VM instances using IAM roles.

Endpoints 8

projects.locations

  • POSTSigns an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine./v1/:parent:signSshPublicKeySigns an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.

users

  • GETRetrieves the profile information used for logging in to a virtual machine on Google Compute Engine./v1/:name/loginProfile?projectId=string&systemId=stringRetrieves the profile information used for logging in to a virtual machine on Google Compute Engine.
  • POSTAdds an SSH public key and returns the profile information/v1/:parent:importSshPublicKey?projectId=string&regions=stringAdds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login…

users.sshPublicKeys

  • GETRetrieves an SSH public key./v1/:nameRetrieves an SSH public key.
  • DELETEDeletes an SSH public key./v1/:nameDeletes an SSH public key.
  • PATCHUpdates an SSH public key and returns the profile information/v1/:name?updateMask=stringUpdates an SSH public key and returns the profile information. This method supports patch semantics.
  • POSTCreate an SSH public key/v1/:parent/sshPublicKeysCreate an SSH public key

users.projects

  • POSTAdds a POSIX account and returns the profile information/v1/:nameAdds a POSIX account and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile.

API details

Base URL
https://oslogin.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 4 scopes
An API key in the key query parameter
Operations
8 operations on 5 pathsPOST 4GET 2PATCH 1DELETE 1
Main resources
users.sshPublicKeys 4users 2projects.locations 1users.projects 1
Response formats
application/json
Description format
Google API Discovery, API version v1

How to test the Cloud OS Login API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Cloud OS Login API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 4 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Signs an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.” (POST /v1/:parent:signSshPublicKey), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Cloud OS Login API?

You can use OS Login to manage access to your VM instances using IAM roles. It is listed under Developer tools and has 8 endpoints.

Who publishes the Cloud OS Login API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Cloud OS Login API?

Requests go to https://oslogin.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Cloud OS Login API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 4 scopes; an API key in the key query parameter.

How many endpoints does the Cloud OS Login API have?

8 operations on 5 paths (4 POST, 2 GET, 1 PATCH, 1 DELETE). The largest groups are users.sshPublicKeys, users, projects.locations, users.projects.

Is forking the Cloud OS Login API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.