- Development Integration
- /
- SDK
- /
- Java
- /
Management module
- /
Manage Pipeline
- /
- Re-upload Pipeline function
¶ Re-upload Pipeline function
Update time: 2025-07-23 07:34:21
This document is automatically generated based on https://github.com/authing/authing-docs-factory based on https://api-explorer.genauth.ai V3 API, and is consistent with API parameters and return results. If the description of this document is incorrect, please refer to V3 API.
When the Pipeline function fails to upload, re-upload the Pipeline function
¶ Method Name
ManagementClient.reuploadPipelineFunction
¶ Request Parameters
| Name | Type | Is it required | Default Value | Description | Example Value |
|---|---|---|---|---|---|
| funcId | string | Yes | - | Pipeline function ID | 62ce9135dxxxxb83e373f5d6 |
¶ Sample Code
package test.management;
import cn.authing.sdk.java.client.ManagementClient;
import cn.authing.sdk.java.dto.PipelineFunctionSingleRespDto;
import cn.authing.sdk.java.dto.ReUploadPipelineFunctionDto;
import cn.authing.sdk.java.model.ManagementClientOptions;
import cn.authing.sdk.java.util.JsonUtils;
public class ReuploadPipelineFunctionTest {
// Need to be replaced with your GenAuth Access Key ID
private static final String ACCESS_KEY_ID = "AUTHING_ACCESS_KEY_ID";
// Need to be replaced with your GenAuth Access Key Secret
private static final String ACCESS_KEY_SECRET = "AUTHING_ACCESS_KEY_SECRET";
public static void main(String[] args) throws Throwable {
ManagementClientOptions clientOptions = new ManagementClientOptions();
clientOptions.setAccessKeyId(ACCESS_KEY_ID);
clientOptions.setAccessKeySecret(ACCESS_KEY_SECRET);
// If you are a private deployment customer, you need to set the GenAuth service domain name
// clientOptions.setHost("https://api.your-authing-service.com");
ManagementClient client = new ManagementClient(clientOptions);
ReUploadPipelineFunctionDto reUploadPipelineFunctionDto = new ReUploadPipelineFunctionDto();
reUploadPipelineFunctionDto.setFuncId("AUTHING_FUNC_ID");
PipelineFunctionSingleRespDto pipelineFunctionSingleRespDto = client.reuploadPipelineFunction(reUploadPipelineFunctionDto);
System.out.println(JsonUtils.serialize(pipelineFunctionSingleRespDto));
}
}
¶ Request Response
Type: PipelineFunctionSingleRespDto
| Name | Type | Description |
|---|---|---|
| statusCode | number | Business status code, which can be used to determine whether the operation is successful. 200 means success. |
| message | string | Description |
| apiCode | number | Segmented error code, which can be used to get the specific error type (successful requests are not returned). For a detailed list of error codes, see: API Code List (opens new window) |
| requestId | string | Request ID. Returned when the request fails. |
| data | PipelineFunctionDto | Response data |
Example Results:
{
"statusCode": 200,
"message": "Operation successful",
"requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
"data": {
"funcId": "62ce9135dxxxxb83e373f5d6",
"funcName": "System maintenance is prohibited from registration/login every Sunday morning from 3 to 6 am",
"funcDescription": "Registration/login is prohibited every Sunday from 3-6 am due to system maintenance.",
"scene": "PRE_REGISTER",
"createdAt": "2022-07-03T03:20:30.000Z",
"updatedAt": "2022-07-03T03:20:30.000Z",
"timeout": 3,
"sourceCode": "async function pipe(user, context, callback) {\n const date = new Date();\n const d = date.getDay();\n const n = date.getHours();\n // Registration is prohibited between 3-6 a.m. every Sunday\n if (d === 0 && (3 <= n && n <= 6)) {\n return callback(new Error('System maintenance, registration temporarily suspended!'));\n }\n callback(null, user, context)\n}",
"status": "success"
}
}
¶ Data Structure
¶ PipelineFunctionDto
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| funcId | string | yes | Function ID | 62ce9135dxxxxb83e373f5d6 |
| funcName | string | yes | Function Name | Registration/login is prohibited every Sunday from 3-6 am due to system maintenance. |
| funcDescription | string | no | Function description | Registration/login is prohibited every Sunday from 3-6 am due to system maintenance. |
| scene | string | yes | Function triggering scenario: - PRE_REGISTER: before registration- POST_REGISTER: after registration- PRE_AUTHENTICATION: before authentication- POST_AUTHENTICATION: after authentication- PRE_OIDC_ID_TOKEN_ISSUED: before OIDC ID Token is issued- PRE_OIDC_ACCESS_TOKEN_ISSUED: Before OIDC Access Token is issued- PRE_COMPLETE_USER_INFO: Before completing user information | PRE_REGISTER |
| createdAt | string | yes | Function creation time | 2022-07-03T03:20:30.000Z |
| updatedAt | string | yes | Function modification time | 2022-07-03T03:20:30.000Z |
| isAsynchronous | boolean | yes | Whether to execute asynchronously. Functions set to asynchronous execution will not block the execution of the entire process and are suitable for asynchronous notification scenarios, such as Feishu group notifications, DingTalk group notifications, etc. | |
| timeout | number | yes | Function running timeout, the shortest is 1 second, the longest is 60 seconds, and the default is 3 seconds. | 3 |
| terminateOnTimeout | boolean | yes | If the function runs out of time, whether to terminate the entire process, the default is no. | |
| sourceCode | string | yes | Function source code | |
| uploadErrMsg | string | no | Error message for upload failure | |
| enabled | boolean | yes | Whether this Pipeline is enabled |
async function pipe(user, context, callback) { |
const date = new Date();
const d = date.getDay();
const n = date.getHours();
// Registration is prohibited from 3-6 am every Sunday
if (d === 0 && (3 <= n && n <= 6)) {
return callback(new Error('The system is under maintenance, registration is temporarily suspended! '));
}
callback(null, user, context)
}
