Cloudsmith

The Cloudsmith Developer Hub

Welcome to the Cloudsmith developer hub. You'll find comprehensive guides and documentation to help you start working with Cloudsmith as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

Introduction

 

The Cloudsmith REST (REpresentational State Transfer) API (Application Programming Interface) provides everything you love about Cloudsmith but in a programmatic machine-accessible RESTful format. We believe in providing a rich API to enable exciting and powerful integrations, hopefully in ways that we couldn't imagine - just like your favourite brick-like toys!

Let Us Know

If you're got any questions about the API, would like to request additional functionality or report bugs, or just want to tell someone about your latest and greatest integration, please don't hesitate to get in touch with us.

Suggest Edits

Endpoints / Versioning

 

The API is versioned to help reduce future compatibility issues if we need to change the API. The following is a list of the current API versions and their URI endpoints:

Version
Endpoint(s)
Date Available

Latest/Default API Version Compatibility

If not explicit version has been specified then the latest version of the API will always be accessible at https://api.cloudsmith.io/ - so for example if the latest version is v1 then this will point to the v1 API. If we release a new v2 API then https://api.cloudsmith.io/ will automatically point to the v2 API, which may break clients that don't expect it. In order to maximise compatibility (if you need it), you should consider pointing at the fully-qualified endpoint for the version you need, such as https://api.cloudsmith.io/v1/, or use one of the alternative methods (see below) for specifying the version.

In addition to explicitly specifying the endpoint in the URI, the following methods of specifying the version are supported by the Cloudsmith API:

Method
Description
Example

Accept Header

Specify the version in the Accept header when making requests.

Accept: application/json; version=v1

Query String

Specify the version in the query string when making requests.

https://api.cloudsmith.io/users/whoami/?version=v1

Suggest Edits

Root Endpoint / Sandbox

 

The root endpoint for the API provides a Swagger UI based sandbox for users to play with and explore the API.

OpenAPI Specification

It's possible to retrieve the OpenAPI Specification for the Cloudsmith API by passing format=openapi in a querystring to the root endpoint, for example: https://api.cloudsmith.io/?format=openapi

Suggest Edits

HTTP Verbs

 

The API attempts to be as RESTful as possible by using appropriate HTTP Verbs for each action, such as:

Verb
Description

OPTIONS

Used to retrieve the available HTTP verbs, name, description, input format (parsers) and output format (renderers) for a particular resource.

GET

Used for retrieving resources.

PUT

Used for replacing resources or collections.

POST

Used for creating resources.

PATCH

Used for partially updating an existing resource with one or more changes. For example, changing the description on a repository resource is a PATCH.

DELETE

Used to delete specific resources.

As described above the OPTIONS request will show the available HTTP verbs for a resource, in addition to some details about the resource itself. Let's see it in action:

curl -i -X OPTIONS  https://api.cloudsmith.io/users/whoami/

HTTP/1.0 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Date: Sun, 29 Jan 2017 18:02:54 GMT

{
  "name": "User Who Am I",
  "description": "View for showing the current user details.",
  "renders": ["application/json"],
  "parses": ["application/json"]
}
Suggest Edits

HTTP Responses

 

Being a responsible RESTful API the status codes that are sent in responses are matched as best as possible to the actual condition met. For example, when rate limiting 429 Too Many Requests is sent rather than twitters more esoteric (although funny) custom 420 Enhance Your Calm. The REST API Tutorial website has a fantastic reference for HTTP Status Codes. The following is a list of the most common status codes returned in responses:

Status Code
Description

200 OK

The request has succeeded. The information returned with the response is dependent on the method used in the request. For example: when a patch to an existing package has been processed.

201 Created

The request has been fulfilled and resulted in a new resource being created. For example: when a new repository has been created.

202 Accepted

The request has been accepted for processing, but the processing has not been completed. For example: when a package upload has been completed but not yet processed.

401 Unauthorized

The request requires user authentication. For example: viewing a private repository requires authentication and authorisation (permission to view the repository).

403 Forbidden

The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. For example: sending requests to places that you shouldn't be. :smiley-cat+:

404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. For example: requesting a repository that doesn't exist (or one that you don't have permission to see).

422 Unprocessable Entity

The server understands the content type of the request entity, and the syntax of the request entity is correct but was unable to process the contained instructions. For example: sending a request that contains field validation errors (such as a missing field).

Suggest Edits

HTTP Redirects

 

The API uses HTTP redirection where appropriate, for example for resources that have moved location. Clients should assume that any requests may result in a redirection and handle it appropriately depending on the HTTP status code. All redirect responses will have a Location header field which contains the URI that the client should request next. The following status codes are used for redirection:

Status Code
Description

301

The requested resource has been permanently redirected. The URI that was used for the initial request has been superseded by the one specified in the Location. Any future requests should be directed to the new URI instead of the original URI.

302 , 307

The requested resource has been temporarily redirected. The URI that was used for the initial request is still valid but in this case the client should repeat the request to the URI in the Location header. Clients should continue to use the original URI in future requests.

Suggest Edits

Response Schema

 

The API is only accessible via HTTPS and all data is sent and received as JSON (unless otherwise specified by specific resource endpoints). For example:

curl -i -H "X-Api-Key: <key>" https://api.cloudsmith.io/users/whoami/

HTTP/1.0 200 OK
Content-Type: application/json
Vary: Cookie
x-content-type-options: nosniff
X-Frame-Options: SAMEORIGIN
X-RateLimit-Interval: 6.0
X-RateLimit-Limit: 1800
X-RateLimit-Remaining: 1799
X-RateLimit-Reset: 1485715956
Connection: close
Server: Cloudsmith MCP
Date: Sun, 29 Jan 2017 17:52:35 GMT

{
  "authenticated": true,
  "slug": "example",
  "slug_perm": "A8mbAfka2fGG",
  "name": "Example User",
  "email": "someone@example.com"
}

Other things to note:

  • Blank fields are included as "null" instead of being omitted.
  • Timestamps are always UTC and in the ECMA-262 format: YYYY-MM-DDTHH:MM:SS.SSSZ
  • You can specify pretty=true in the querystring to get formatted (indent=2) JSON.

Summary Resource Representations

When GET requests return a list of resources, or the resource is in the context of another resource (i.e. a sub-resource), the data for those resources only includes a subset of all the available attributes, i.e. a summary representation. This is due to performance reasons in which certain attributes are expensive to compute. In order to see the fully detailed representation of a resource, fetch it individually, where required.

Detailed Resource Representations

When requests for a specific resource are issued the fully detailed representation for that resource will be returned, which will include all attributes that are exposed by the API for that resource type. Note that this is subject to authentication, where certain resources will vary the amount of attributes returned depending on the authorisation of the authenticated user. Please refer to the documentation for specific resource endpoints for details.

Suggest Edits

Query Parameters

 

Many of the API resource endpoints take optional parameters, such as for filtering, in addition to standard ones for versioning and pagination. For GET requests, any parameter that isn't specified as part of the URI path can be specified as an HTTP query string parameter. For example, to retrieve packages for a repository that are currently awaiting synchronisation:

curl -i https://api.cloudsmith.io/package/example/repo/?status=awaiting_sync

For DELETE, PATCH, POST and PUT requests, any optional parameters should be specified within the body of the request, encoded as JSON with a Content-Type header specifying a value of application/json. For example, to delete packages for a repository that are currently awaiting synchronisation:

curl -i -H "Content-Type: application/json" -d '{"status": "awaiting_sync"}' -X DELETE https://api.cloudsmith.io/package/example/repo/
Suggest Edits

Error Handling

 

Expected errors that occur when interacting with the API result in a 4xx error code, which varies depending on the condition. All error responses contain at least a detail attribute that explains why the error has occurred. The following is a list of some of the most common errors that are encountered and why:

Not Authenticated

A 401 Unauthorized status code is sent when the resource endpoint expects the user to be authenticated but the user isn't. For example, if sending a request as an anonymous user to an authenticated endpoint the following error is sent as a response:

HTTP/1.0 401 Unauthorized
Allow: POST, OPTIONS
Content-Length: 58
Server: Cloudsmith MCP

{
  "detail": "Authentication credentials were not provided."
}

No Permissions

A 403 Forbidden status code is sent when the resource endpoint expects the user to have specific permissions, which will be detailed in the resource endpoint documentation. For example, if sending a request as an authenticated user to a resource endpoint in which we don't have permissions (such as one belonging to another user), the following error is sent as a response:

HTTP/1.0 401 Unauthorized
Allow: POST, OPTIONS
Content-Length: 63
Server: Cloudsmith MCP

{
  "detail": "You do not have permission to perform this action."
}

Variable Messages

The detail field in response can be customised by the resource endpoint, so it might be different than the text shown above.

Invalid JSON Object Error

A 400 Bad Request status code is sent when the body of the document is expected to be JSON encoded, but the actual content is otherwise. For example, if the body was sent as foo then the following error is sent as a response:

HTTP/1.0 400 Bad Request
Allow: POST, OPTIONS
Content-Length: 68
Content-Type: application/json
Server: Cloudsmith MCP

{
  "detail": "JSON parse error - No JSON object could be decoded"
}

Malformed JSON Error

A 400 Bad Request status code is sent when the body of the document is cannot be parsed as syntactically correct JSON. For example, if the body was sent as { then the following error is sent as a response:

HTTP/1.0 400 Bad Request
Content-Length: 79
Content-Type: application/json
Server: Cloudsmith MCP

{
  "detail": "JSON parse error - Expecting object: line 1 column 1 (char 0)"
}

Field Validation Error

A 422 Unprocess Entity status code is sent when the resource endpoint receives a JSON body that is syntactically but not semantically correct. These error responses contain a fields attribute that lists the specific fields affected by the error condition. For example, if the resource endpoint expected a filename attribute in the body to be populated but isn't then the following error is sent as a response:

HTTP/1.0 422 Unprocessable Entity
Content-Length: 132
Content-Type: application/json
Server: Cloudsmith MCP

{
  "fields": {
    "filename": [
      "This field may not be null."
    ]
  },
  "code": "invalid",
  "detail": "Invalid input."
}
Suggest Edits

Authentication

 

The majority of resources provided by the API require some form of authentication, which identifies the client to the API in the context of a particular user. Other resources are accessible anonymously so don't need authentication (although they may provided expanded detail for authenticated users). You can use the following methods to authenticate:

Basic Authentication

The simplest (but least recommended) way to authenticate is to provide your login email and password when making API requests (replacing <email> with your username and <password> with your password):

curl -u "<email>:<password>" https://api.cloudsmith.io/users/whoami/

Specifying an invalid email and/or password will result in an 401 Unauthorized status code, and the body will specify that invalid credentials were received. Let's see it in action:

curl -i -u "example:wrongpassword" -X OPTIONS https://api.cloudsmith.io/users/whoami/

HTTP/1.0 401 Unauthorized
Server: Werkzeug/0.11.11 Python/2.7.12
Date: Sun, 29 Jan 2017 18:40:49 GMT

{
  "detail": "Invalid username/password."
}

Security Warning - Access All Areas

We probably shouldn't need to say this but disclosure of your email and password will allow a malicious third-party to takeover your account and cause damage. We recommend using an API Key instead and using a lesser privileged account for API access - see Keep Your Secrets Close below for suggestions.

API Key / User Token Authentication

Instead of providing your email and password, it is recommended that you instead authenticate to the API by specifying your API Key.

You can specify your API Key via the X-Api-Key header when making requests (replacing <key> with your actual API Key):

curl -H "X-Api-Key: <key>" https://api.cloudsmith.io/users/whoami/

You can also specify your API Key via the Authorization header when making requests (replacing <key> with your actual API Key):

curl -H "Authorization: token <key>" https://api.cloudsmith.io/users/whoami/

Specifying an invalid token will result in an 401 Unauthorized status code, and the body will specify that an invalid token was received. Let's see it in action:

curl -i -H "X-Api-Key: foobar" -X OPTIONS https://api.cloudsmith.io/users/whoami/

HTTP/1.0 401 Unauthorized
Server: Werkzeug/0.11.11 Python/2.7.12
Date: Sun, 29 Jan 2017 18:38:24 GMT

{
  "detail":"Invalid token."
}

Getting Your API Key

You can find your API Key within your User Settings or you can request (or reset) it via the Users Token API Endpoint.

Security Warning - Keep Your Secrets Close

If your API key is given to someone else they will be able to access the API in its entirety as you (although they won't be able to login to the website itself, which makes this method slightly more secure that using Basic Authentication). This should be viewed as a security risk and every effort should be taken to protect your API Key from disclosure. If you need to add read-only access our suggestion is to create a lesser privileged bot-user account and use that instead for scripts/automation.

Suggest Edits

Rate Limiting

 

Unless specified otherwise, all requests to the API are rate limited to prevent abuse, accidental or otherwise. It is not intended for this rate limit to interfere with any legitimate use of the API. The limits vary depending on the type of client that is accessing the API, according to the following rules (unless specific otherwise by the specific API endpoint):

Client Type
Description
Limit

Non-Authenticated/Anonymous User

Users that are not logged in, requests are associated by IP address.

60 requests per hour.

Authenticated User w/ Non-Premium Plan

Users that are authenticated but do not have a premium (paid) subscription.

600 requests per hour.

Authenticated User w/ Premium Plan

Users that are authenticated and have a premium (paid) subscription.

1800 requests per hour.

Need Higher Limits?

No problem! If you're on a non-premium plan then all you need to do is activate a premium plan, such as Package XS (only $10/pcm). If you're already on a premium plan then we'll be happy to raise the limit for you, just send us a description of use case and the desired limit to us and we'll take care of it.

Every response from the API will include the following headers to provide information about the current rate limit status:

Header
Meaning
Example

X-RateLimit-Limit

The maximum number of requests that the client is permitted to send per hour.

600

X-RateLimit-Remaining

The number of requests that are remaining in the current rate limit window.

588

X-RateLimit-Reset

The UTC epoch timestamp at which the current rate limit window will reset.

1485706850

X-RateLimit-Interval

The time in seconds that client is suggested to wait until the next request in order to avoid consuming too much within the rate limit window.

0.98256663893

Retry-After

The time in seconds to wait before the next request will be allowed (only sent if the request has been throttled).

3384

Let's see it in action:

curl -i http://api.cloudsmith.io/users/whoami/

HTTP/1.0 200 OK
X-RateLimit-Interval: 60.0
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 599
X-RateLimit-Reset: 1485712175
Date: Sun, 29 Jan 2017 16:49:34 GMT

If the client has exceeded the rate limit in a particular rate limit window a 429 Too Many Requests status code will be sent instead of acting upon the request. The body response will be JSON encoded and include a detail message. Let's see it in action:

curl -i http://api.cloudsmith.io/users/whoami/

HTTP/1.0 429 Too Many Requests
Allow: GET, OPTIONS
Content-Type: application/json
Retry-After: 3304
Vary: Cookie
x-content-type-options: nosniff
X-Frame-Options: SAMEORIGIN
X-RateLimit-Interval: 3303.55762601
X-RateLimit-Limit: 1
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1485712175
Date: Sun, 29 Jan 2017 16:54:30 GMT

{
  "detail": "Request was throttled. Expected available in 3304.0 seconds."
}
Suggest Edits

Pagination

 

API requests that return more than one item may be paginated, which simply means the total number of items is split into logical pages, in the same way that a book is split into pages. Each page will have a certain number of items in it from one upto the page limit - empty datasets are never paginated.

When pagination is enabled the following query string parameters are supported:

Parameter
Description

page

The current page of the pagination dataset to view. The page number is 1-based, so omitting or specifying a non-positive number will return the first page.

page_size

The page size to divide the dataset into. The default amount (if not specified) is 30 items per page and the maximum configurable is 100 items per page.

When pagination occurs, the following headers will be represent in API responses:

Header
Description

Link (based on RFC5988

Hypermedia links for the previous page (if any) and for the next page (if any). Some of which may require expansion as URI templates.

X-Pagination-Count

The total number of items in the dataset.

X-Pagination-Page

The number of the current page.

X-Pagination-PageTotal

The total number of pages in the dataset.

X-Pagination-PageSize

The size of each page in the dataset.

The Link header can contain the following rel values:

Name
Description

first

The link relation to the first page of results. This will only be present if there is more than one page.

prev

The link relation to the previous page of results. This will only be present if the client has requested a page greater than 1.

next

The link relation to the next page of results. This will only be present if the client has requested a page less than the last/final page.

last

The link relation to the last/final page of results. This will only be present if there is more than one page.

Let's see it in action:

curl -i -H "X-Api-Key: <key>" 'https://api.cloudsmith.io/package/example/repo/packages/?page=2&page_size=1'

HTTP/1.0 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Link: <https://api.cloudsmith.io/package/example/repo/packages/?page=1>; rel="first", <https://api.cloudsmith.io/package/example/repo/packages/?page=1>; rel="prev", <https://api.cloudsmith.io/package/example/repo/packages/?page=3>; rel="next", <https://api.cloudsmith.io/package/example/repo/packages/?page=3>; rel="last"
X-Pagination-Count: 3
X-Pagination-Page: 2
X-Pagination-PageTotal: 3
X-Pagination-PageSize: 1
Server: Cloudsmith MCP
Date: Sun, 29 Jan 2017 18:40:55 GMT

[snip]

Page Sizes / Remainders

If the page size is 100 and the dataset size is 400, then there will be 4 pages available for retrieval. If the dataset isn't cleanly divided by the page size the remainder will be on the final page. For example, if the page size is 100 and the dataset size is 350 then the last (4th) page will have 50 items on it.

Suggest Edits

Conditional Requests

 

Where responses reference non-ephemeral resources, such as packages, the API will return an ETag header that represents a uniqueness identifier for the results. If an ETag is sent then the API might also send a Last-Modified header if it knows when the resource was last updated, but it's better to rely on the ETag alone. A client can send the If-None-Match header with the value of the known ETag to avoid returning the full resource again, in which case a match will result in a 304 Not Modified status being returned instead.

Let's see it in action:

curl -i -H "X-Api-Key: foobar" https://api.cloudsmith.io/users/whoami/

HTTP/1.0 200 OK
Content-Type: application/json
ETag: "99ed160b320d4daa29fcd6097de8cdAf"
Connection: close
Server: Cloudsmith MCP
Date: Sun, 29 Jan 2017 23:56:34 GMT

{
  "authenticated": true,
  "slug": "example",
  "slug_perm": "ABbx54bagaAB",
  "name": "Example User",
  "email": "user@example.com"
}

curl -i -H "X-Api-Key: foobar" -H "If-None-Match: 99ed160b320d4daa29fcd6097de8cdAf" https://api.cloudsmith.io/users/whoami/

HTTP/1.0 304 Not Modified
content-type: text/plain
ETag: "99ed160b320d4daa29fcd6097de8cdAf"
Server: Cloudsmith MCP
Date: Sun, 29 Jan 2017 23:57:20 GMT

Rate Limiting

If If-None-Match or Is-Modified-Since (where Last-Modified was sent) is used and results in a 304 Not Modified response, the client will not incur any changes to their current rate limit usage. In other words, unmodified resources do not count towards rate limits.

Suggest Edits

Cross-Origin Resource Sharing

 

The API supports Cross-Origin Resource Sharing (CORS) for requests from any origin. For more details on CORS and how it affects requests please refer to the W3 CORS Specification and this document on CORS-related security. When an Origin header is specified in the request, the following headers are added to requests, varying depending on whether the request is a preflight request (such as using the OPTIONS method) or otherwise:

Header
Preflight Only
Description

Access-Control-Allow-Credentials

NO

Indicates whether the response to request can be exposed. For preflight requests it indicates that the actual request can include user credentials.

Access-Control-Allow-Headers

YES

Indicates which header field names can be used during the actual request.

Access-Control-Allow-Methods

YES

Indicates which methods can be used during the actual request.

Access-Control-Allow-Origin

NO

Indicates whether a resource can be shared by returning the value of the Origin request header, "*", or "null".

Access-Control-Expose-Headers

NO

Indicates which headers are safe to be exposed.

Access-Control-Max-Age

YES

Indicates how long the results of the preflight request can be cached for.

Let's see it in action for a preflight request when the browser goes to https://example.com:

curl -i -X OPTIONS -H "Origin: https://example.com" https://api.cloudsmith.io/users/whoami/

HTTP/1.0 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: accept, accept-encoding, authorization, content-type, dnt, origin, user-agent, x-csrftoken, x-requested-with
Access-Control-Allow-Methods: DELETE, GET, OPTIONS, PATCH, POST, PUT
Access-Control-Allow-Origin: https://example.com
Access-Control-Expose-Headers: ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-RateLimit-Interval, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
Access-Control-Max-Age: 86400
[snip]

Then for the actual non-preflight request:

curl -i -H "Origin: https://example.com" https://api.cloudsmith.io/users/whoami/

HTTP/1.0 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://example.com
Access-Control-Expose-Headers: ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-RateLimit-Interval, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
[snip]
Suggest Edits

JSONP Not Supported

 

As per the JSONP Wikipedia article: JSONP (JSON with Padding or JSON-P) is a technique used by web developers to bypass the restrictions of browsers' same-origin policy. Due to JSONP being only appropriate for global unauthenticated resources, the Cloudsmith API explicitly doesn't support JSONP and currently has no plans to implement it. Our recommendation is to utilise CORS instead.

 
Suggest Edits

Authenticate a package resource request.

Authenticate a package resource request.

This API endpoint is used internally by the S3Proxy.

 
gethttps://api.cloudsmith.io//package/auth/
curl --request GET \
  --url https://api.cloudsmith.io//package/auth/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cloudsmith.io//package/auth/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cloudsmith.io//package/auth/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cloudsmith.io//package/auth/");

xhr.send(data);
import requests

url = "https://api.cloudsmith.io//package/auth/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

View supported package backends.

View supported package backends.

 
gethttps://api.cloudsmith.io//package/backends/
curl --request GET \
  --url https://api.cloudsmith.io//package/backends/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cloudsmith.io//package/backends/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cloudsmith.io//package/backends/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cloudsmith.io//package/backends/");

xhr.send(data);
import requests

url = "https://api.cloudsmith.io//package/backends/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Endpoint to check basic API connectivity.

Endpoint to check basic API connectivity.

 
gethttps://api.cloudsmith.io//status/check/basic/
curl --request GET \
  --url https://api.cloudsmith.io//status/check/basic/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cloudsmith.io//status/check/basic/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cloudsmith.io//status/check/basic/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cloudsmith.io//status/check/basic/");

xhr.send(data);
import requests

url = "https://api.cloudsmith.io//status/check/basic/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
 
posthttps://api.cloudsmith.io//token/
curl --request POST \
  --url https://api.cloudsmith.io//token/
var request = require("request");

var options = { method: 'POST', url: 'https://api.cloudsmith.io//token/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cloudsmith.io//token/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cloudsmith.io//token/");

xhr.send(data);
import requests

url = "https://api.cloudsmith.io//token/"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Provide a brief for the current user (if any).

Provide a brief for the current user (if any).

 
gethttps://api.cloudsmith.io//users/whoami/
curl --request GET \
  --url https://api.cloudsmith.io//users/whoami/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cloudsmith.io//users/whoami/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cloudsmith.io//users/whoami/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cloudsmith.io//users/whoami/");

xhr.send(data);
import requests

url = "https://api.cloudsmith.io//users/whoami/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results