forked from cloud-annotations/docusaurus-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi-gen.json
1 lines (1 loc) · 7.81 KB
/
openapi-gen.json
1
{"openapi":"3.0.3","info":{"title":"Cloud Object Storage","version":"1.0.1"},"servers":[{"url":"https://s3.{region}.cloud-object-storage.appdomain.cloud","variables":{"region":{"enum":["us","eu","ap","us-south","us-east","eu-gb","eu-de","au-syd","jp-tok","ams03","che01","hkg02","mex01","mil01","mon01","osl01","par01","sjc04","sao01","seo01","sng01","tor01"],"default":"us"}}}],"paths":{"/identity/token":{"post":{"tags":["Authentication"],"summary":"Generating an IAM token","description":"Generate an IBM Cloud® Identity and Access Management (IAM) token by using either your [IAM API key](https://cloud.ibm.com/docs/iam?topic=iam-userapikey#userapikey) or a [service ID's API key](https://cloud.ibm.com/docs/iam?topic=iam-serviceidapikeys#serviceidapikeys) IBM Cloud APIs can be accessed only by users who are authorized by an assigned IAM role.\nEach user who is calling the API must pass credentials for the API to authenticate.\n\nYou can generate an IAM token by using either your IBM Cloud API key or a service ID's API key.\nThe API key is a permanent credential that can be reused if you don't lose the API key value or delete the API key in the account.\nThis process is also used if you are developing an application that needs to work with other IBM Cloud services.\nYou must use a service ID API key to get an access token to be passed to each of the IBM Cloud services.\n\n:::note\nAn access token is a temporary credential that expires after 1 hour.\nAfter the acquired token expires, you must generate a new token to continue calling IBM Cloud or service APIs, and you can perform only actions that are allowed by your level of assigned access within all accounts.\n:::","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AuthForm"}}},"required":true},"security":[{"//":[]}],"responses":{"200":{"description":"ok"}}}},"/":{"get":{"tags":["Bucket operations"],"summary":"List buckets","description":"A `GET` request sent to the endpoint root returns a list of buckets that are associated with the specified service instance.\nFor more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).","parameters":[{"$ref":"#/components/parameters/Extended"},{"name":"ibm-service-instance-id","in":"header","description":"List buckets that were created in this service instance.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/{bucketName}":{"put":{"tags":["Bucket operations"],"summary":"Create a bucket","description":"A `PUT` request sent to the endpoint root followed by a string will create a bucket.\nFor more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).\nBucket names must be globally unique and DNS-compliant; names between 3 and 63 characters long must be made of lowercase letters, numbers, and dashes.\nBucket names must begin and end with a lowercase letter or number.\nBucket names resembling IP addresses are not allowed.\nThis operation doesn't make use of operation specific query parameters.\n\n:::info important\nBucket names must be unique because all buckets in the public cloud share a global namespace.\nThis allows for access to a bucket without needing to provide any service instance or account information.\nIt is also not possible to create a bucket with a name beginning with `cosv1-` or `account-` as these prefixes are reserved by the system.\n:::\n\n:::note\nPersonally Identifiable Information (PII): When creating buckets or adding objects, please ensure to not use any information that can identify any user (natural person) by name, location or any other means in the name of the bucket or object.\n:::\n\n## Create a bucket with a different storage class\n\nTo create a bucket with a different storage class, send an XML block specifying a bucket configuration with a `LocationConstraint` of `{provisioning code}` in the body of a `PUT` request to a bucket endpoint.\nFor more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).\nNote that standard bucket [naming rules](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-compatibility-api-bucket-operations#compatibility-api-new-bucket) apply.\nThis operation does not make use of operation specific query parameters.\n\nThe body of the request must contain an XML block with the following schema:\n\n```xml\n<CreateBucketConfiguration>\n <LocationConstraint>us-vault</LocationConstraint>\n</CreateBucketConfiguration>\n```\n\nA list of valid provisioning codes for `LocationConstraint` can be referenced in [the Storage Classes guide](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-classes#classes-locationconstraint).\n\n## Create a new bucket with Key Protect or Hyper Protect Crypto Services managed encryption keys (SSE-KP)\n\nTo create a bucket where the encryption keys are managed by Key Protect or Hyper Protect Crypto Services, it is necessary to have access to an active Key Protect or Hyper Protect Crypto Services service instance located in the same location as the new bucket.\nThis operation does not make use of operation specific query parameters.\n\nFor more information on using Key Protect to manage your encryption keys, [see the documentation for Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-getting-started-tutorial).\n\nFor more information on Hyper Protect Crypto Services, [see the documentation](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started).\n\n:::note\nNote that managed encryption is **not** available in a Cross Region configuration and any SSE-KP buckets must be Regional.\n:::","parameters":[{"name":"bucketName","in":"path","required":true,"schema":{"type":"string"}},{"name":"ibm-service-instance-id","in":"header","description":"This header references the service instance where the bucket will be created and to which data usage will be billed.","required":true,"schema":{"type":"string"}},{"name":"ibm-sse-kp-encryption-algorithm","in":"header","description":"This header is used to specify the algorithm and key size to use with the encryption key stored by using Key Protect. This value must be set to the string `AES256`.","required":false,"schema":{"type":"string"}},{"name":"ibm-sse-kp-customer-root-key-crn","in":"header","description":"This header is used to reference the specific root key used by Key Protect or Hyper Protect Crypto Services to encrypt this bucket. This value must be the full CRN of the root key.","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/CreateBucketConfiguration"}}}},"responses":{"200":{"description":"ok"}}},"head":{"tags":["Bucket operations"],"summary":"Retrieve a bucket's headers","description":"A `HEAD` issued to a bucket will return the headers for that bucket.","parameters":[{"name":"bucketName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"AuthForm":{"type":"object","properties":{"grant_type":{"type":"string","enum":["urn:ibm:params:oauth:grant-type:apikey"]},"apikey":{"type":"string"}},"required":["grant_type","apikey"]},"CreateBucketConfiguration":{"type":"object","properties":{"CreateBucketConfiguration":{"type":"object"}}}},"parameters":{"Extended":{"in":"query","name":"extended","description":"Provides `LocationConstraint` metadata in the listing.","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true}}},"security":[{"BearerAuth":[]}],"tags":[{"name":"Authentication"},{"name":"Bucket operations"},{"name":"Object operations"}]}