Create an index
post
/20190828/tables/{tableNameOrId}/indexes
Create a new index on the table identified by tableNameOrId.
Request
Path Parameters
-
tableNameOrId: string
A table name within the compartment, or a table OCID.
Header Parameters
-
opc-request-id: string
The client request ID for tracing.
-
opc-retry-token(optional): string
Minimum Length:
1
Maximum Length:64
A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
Specifications for the new index.
Root Schema : CreateIndexDetails
Type:
object
Specifications for the new index.
Show Source
-
compartmentId(optional):
string
The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
-
isIfNotExists(optional):
boolean
If true, the operation completes successfully even when the index exists. Otherwise, an attempt to create an index that already exists will return an error.
-
keys:
array keys
A set of keys for a secondary index.
-
name:
string
Minimum Length:
1
Maximum Length:64
Index name.
Nested Schema : keys
Type:
array
A set of keys for a secondary index.
Show Source
-
Array of:
object IndexKey
Specifies a single key in a secondary index.
Nested Schema : IndexKey
Type:
object
Specifies a single key in a secondary index.
Show Source
-
columnName:
string
The name of a column to be included as an index key.
-
jsonFieldType(optional):
string
If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
-
jsonPath(optional):
string
If the specified column is of type JSON, jsonPath contains a dotted path indicating the field within the JSON object that will be the index key.
Response
Supported Media Types
- application/json
202 Response
Accepted the request. The index will be created.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
opc-work-request-id: string
Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
409 Response
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
retry-after: number(float)
A decimal number representing the number of seconds the client should wait before polling this endpoint again.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
Default Response
Unknown Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.