Function
This API is used to obtain the language information of the code navigation function.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
No identity policy-based permission required for calling this API.
URI
GET https://{hostURL}/v4/repositories/{repository_id}/repository/nav/language
Table 1 Path Parameters | Parameter | Mandatory | Type | Description |
| repository_id | Yes | Integer | Definition You can call the API used to query all repositories of the user to query the project list to obtain the repository ID. Constraints N/A Default Value N/A Value range: 1~2147483647 |
Response Parameters
Status code: 200
Table 3 Response body parameters | Parameter | Type | Description |
| result | String | Definition Result identifier. Constraints N/A |
| message | String | Definition Result message. Constraints N/A |
| language_list | Array of LanguageDto objects | Definition Language list. Constraints N/A |
Table 4 LanguageDto | Parameter | Type | Description |
| name | String | Definition Language name. Constraints N/A Default value: N/A |
| extension_list | Array of strings | Definition File name extension. Constraints N/A |
Example Requests
GET https://{endpoint}/v4/repositories/123/repository/nav/language Example Responses
Status code: 200
OK
{
"result" : "0",
"message" : "",
"language_list" : [ {
"name" : "c",
"extension_list" : [ ".c", ".h" ]
}, {
"name" : "cpp",
"extension_list" : [ ".cpp", ".hpp", ".C", ".hxx", ".cc", ".cxx" ]
}, {
"name" : "go",
"extension_list" : [ ".go" ]
}, {
"name" : "java",
"extension_list" : [ ".java" ]
}, {
"name" : "javascript",
"extension_list" : [ ".js" ]
}, {
"name" : "rust",
"extension_list" : [ ".rs" ]
}, {
"name" : "ruby",
"extension_list" : [ ".rb" ]
}, {
"name" : "php",
"extension_list" : [ ".php" ]
}, {
"name" : "python",
"extension_list" : [ ".py" ]
}, {
"name" : "csharp",
"extension_list" : [ ".cs" ]
}, {
"name" : "scala",
"extension_list" : [ ".scala" ]
}, {
"name" : "typescript",
"extension_list" : [ ".ts" ]
}, {
"name" : "cangjie",
"extension_list" : [ ".cangjie", ".cj" ]
} ]
} Status Codes
| Status Code | Description |
| 200 | OK |