You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/api/cos/generating-an-iam-token.api.mdx
+5-104Lines changed: 5 additions & 104 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,118 +3,19 @@ id: generating-an-iam-token
3
3
sidebar_label: Generating an IAM token
4
4
hide_title: true
5
5
hide_table_of_contents: true
6
-
api:
7
-
{
8
-
"tags": ["Authentication"],
9
-
"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:::",
"content": "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:::",
api: {"tags":["Authentication"],"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":{"type":"object","properties":{"grant_type":{"type":"string","enum":["urn:ibm:params:oauth:grant-type:apikey"]},"apikey":{"type":"string"}},"required":["grant_type","apikey"]}}},"required":true},"security":[{"//":[]}],"responses":{"200":{"description":"ok"}},"method":"post","path":"/identity/token","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"}}}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"},"BasicAuth":{"type":"http","scheme":"basic"}},"info":{"title":"Cloud Object Storage","version":"1.0.1"},"postman":{"name":"Generating an IAM token","description":{"content":"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:::","type":"text/plain"},"url":{"path":["identity","token"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"method":"POST","body":{"mode":"urlencoded","urlencoded":[]}}}
108
7
sidebar_class_name: "post api-method"
109
8
---
110
9
111
10
importParamsItemfrom"@theme/ParamsItem";
112
-
importSchemaItemfrom"@theme/SchemaItem";
11
+
importSchemaItemfrom"@theme/SchemaItem"
113
12
importTabsfrom"@theme/Tabs";
114
13
importTabItemfrom"@theme/TabItem";
115
14
116
15
## Generating an IAM token
117
16
17
+
18
+
118
19
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.
119
20
Each user who is calling the API must pass credentials for the API to authenticate.
120
21
@@ -133,4 +34,4 @@ After the acquired token expires, you must generate a new token to continue call
Copy file name to clipboardExpand all lines: demo/api/cos/list-buckets.api.mdx
+5-121Lines changed: 5 additions & 121 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,135 +3,19 @@ id: list-buckets
3
3
sidebar_label: List buckets
4
4
hide_title: true
5
5
hide_table_of_contents: true
6
-
api:
7
-
{
8
-
"tags": ["Bucket operations"],
9
-
"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).",
10
-
"parameters":
11
-
[
12
-
{
13
-
"in": "query",
14
-
"name": "extended",
15
-
"description": "Provides `LocationConstraint` metadata in the listing.",
16
-
"required": false,
17
-
"schema": { "type": "boolean" },
18
-
"allowEmptyValue": true,
19
-
},
20
-
{
21
-
"name": "ibm-service-instance-id",
22
-
"in": "header",
23
-
"description": "List buckets that were created in this service instance.",
"content": "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).",
82
-
"type": "text/plain",
83
-
},
84
-
"url":
85
-
{
86
-
"path": [""],
87
-
"host": ["{{baseUrl}}"],
88
-
"query":
89
-
[
90
-
{
91
-
"disabled": false,
92
-
"description":
93
-
{
94
-
"content": "Provides `LocationConstraint` metadata in the listing.",
95
-
"type": "text/plain",
96
-
},
97
-
"key": "extended",
98
-
"value": "",
99
-
},
100
-
],
101
-
"variable": [],
102
-
},
103
-
"header":
104
-
[
105
-
{
106
-
"disabled": false,
107
-
"description":
108
-
{
109
-
"content": "(Required) List buckets that were created in this service instance.",
api: {"tags":["Bucket operations"],"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":[{"in":"query","name":"extended","description":"Provides `LocationConstraint` metadata in the listing.","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true},{"name":"ibm-service-instance-id","in":"header","description":"List buckets that were created in this service instance.","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]},{"BearerAuth":[],"BasicAuth":[]}],"responses":{"200":{"description":"ok"}},"method":"get","path":"/","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"}}}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"},"BasicAuth":{"type":"http","scheme":"basic"}},"info":{"title":"Cloud Object Storage","version":"1.0.1"},"postman":{"name":"List buckets","description":{"content":"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).","type":"text/plain"},"url":{"path":[""],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"Provides `LocationConstraint` metadata in the listing.","type":"text/plain"},"key":"extended","value":""}],"variable":[]},"header":[{"disabled":false,"description":{"content":"(Required) List buckets that were created in this service instance.","type":"text/plain"},"key":"ibm-service-instance-id","value":""}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
125
7
sidebar_class_name: "get api-method"
126
8
---
127
9
128
10
importParamsItemfrom"@theme/ParamsItem";
129
-
importSchemaItemfrom"@theme/SchemaItem";
11
+
importSchemaItemfrom"@theme/SchemaItem"
130
12
importTabsfrom"@theme/Tabs";
131
13
importTabItemfrom"@theme/TabItem";
132
14
133
15
## List buckets
134
16
17
+
18
+
135
19
A `GET` request sent to the endpoint root returns a list of buckets that are associated with the specified service instance.
136
20
For more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).
137
21
@@ -140,4 +24,4 @@ For more information about endpoints, see [Endpoints and storage locations](http
0 commit comments