clients/c/generated/api/BlueOceanAPI.c
list_t*
BlueOceanAPI_getPipelineQueue(apiClient_t *apiClient, char * organization , char * pipeline )
{
    list_t    *localVarQueryParameters = NULL;
    list_t    *localVarHeaderParameters = NULL;
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = NULL;
    char      *localVarBodyParameters = NULL;

    // create the path
    long sizeOfPath = strlen("/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue");


    // Path Params
    long sizeOfPathParams_organization = strlen(organization)+3 + strlen(pipeline)+3 + strlen("{ organization }");
    if(organization == NULL) {
        goto end;
    }
    char* localVarToReplace_organization = malloc(sizeOfPathParams_organization);
    sprintf(localVarToReplace_organization, "{%s}", "organization");

    localVarPath = strReplace(localVarPath, localVarToReplace_organization, organization);

    // Path Params
    long sizeOfPathParams_pipeline = strlen(organization)+3 + strlen(pipeline)+3 + strlen("{ pipeline }");
    if(pipeline == NULL) {
        goto end;
    }
    char* localVarToReplace_pipeline = malloc(sizeOfPathParams_pipeline);
    sprintf(localVarToReplace_pipeline, "{%s}", "pipeline");

    localVarPath = strReplace(localVarPath, localVarToReplace_pipeline, pipeline);


    list_addElement(localVarHeaderType,"application/json"); //produces
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "GET");

    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully retrieved queue details");
    }
    if (apiClient->response_code == 401) {
        printf("%s\n","Authentication failed - incorrect username and/or password");
    }
    if (apiClient->response_code == 403) {
        printf("%s\n","Jenkins requires authentication - please set username and password");
    }
    cJSON *BlueOceanAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
    if(!cJSON_IsArray(BlueOceanAPIlocalVarJSON)) {
        return 0;//nonprimitive container
    }
    list_t *elementToReturn = list_createList();
    cJSON *VarJSON;
    cJSON_ArrayForEach(VarJSON, BlueOceanAPIlocalVarJSON)
    {
        if(!cJSON_IsObject(VarJSON))
        {
           // return 0;
        }
        char *localVarJSONToChar = cJSON_Print(VarJSON);
        list_addElement(elementToReturn , localVarJSONToChar);
    }

    cJSON_Delete( BlueOceanAPIlocalVarJSON);
    cJSON_Delete( VarJSON);
    //return type
    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    
    
    
    list_freeList(localVarHeaderType);
    
    free(localVarPath);
    free(localVarToReplace_organization);
    free(localVarToReplace_pipeline);
    return elementToReturn;
end:
    free(localVarPath);
    return NULL;

}
// Retrieve queue details for an organization pipeline
//
Retrieve queue details for an organization pipeline
Retrieve queue details for an organization pipeline
list_t*
BlueOceanAPI_getPipelineQueue(apiClient_t *apiClient, char * organization , char * pipeline )
{
    list_t    *localVarQueryParameters = NULL;
    list_t    *localVarHeaderParameters = NULL;
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = NULL;
    char      *localVarBodyParameters = NULL;
    long sizeOfPath = strlen("/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue");
    long sizeOfPathParams_organization = strlen(organization)+3 + strlen(pipeline)+3 + strlen("{ organization }");
    if(organization == NULL) {
        goto end;
    }
    char* localVarToReplace_organization = malloc(sizeOfPathParams_organization);
    sprintf(localVarToReplace_organization, "{%s}", "organization");
    localVarPath = strReplace(localVarPath, localVarToReplace_organization, organization);
    long sizeOfPathParams_pipeline = strlen(organization)+3 + strlen(pipeline)+3 + strlen("{ pipeline }");
    if(pipeline == NULL) {
        goto end;
    }
    char* localVarToReplace_pipeline = malloc(sizeOfPathParams_pipeline);
    sprintf(localVarToReplace_pipeline, "{%s}", "pipeline");
    localVarPath = strReplace(localVarPath, localVarToReplace_pipeline, pipeline);
    list_addElement(localVarHeaderType,"application/json"); 
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "GET");
    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully retrieved queue details");
    }
    if (apiClient->response_code == 401) {
        printf("%s\n","Authentication failed - incorrect username and/or password");
    }
    if (apiClient->response_code == 403) {
        printf("%s\n","Jenkins requires authentication - please set username and password");
    }
    cJSON *BlueOceanAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
    if(!cJSON_IsArray(BlueOceanAPIlocalVarJSON)) {
        return 0;
    }
    list_t *elementToReturn = list_createList();
    cJSON *VarJSON;
    cJSON_ArrayForEach(VarJSON, BlueOceanAPIlocalVarJSON)
    {
        if(!cJSON_IsObject(VarJSON))
        {
        }
        char *localVarJSONToChar = cJSON_Print(VarJSON);
        list_addElement(elementToReturn , localVarJSONToChar);
    }
    cJSON_Delete( BlueOceanAPIlocalVarJSON);
    cJSON_Delete( VarJSON);
    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    list_freeList(localVarHeaderType);
    free(localVarPath);
    free(localVarToReplace_organization);
    free(localVarToReplace_pipeline);
    return elementToReturn;
end:
    free(localVarPath);
    return NULL;
}
list_t * BlueOceanAPI_getPipelineQueue ( apiClient_t * apiClient , char * organization , char * pipeline ) { list_t * localVarQueryParameters = NULL ; list_t * localVarHeaderParameters = NULL ; list_t * localVarFormParameters = NULL ; list_t * localVarHeaderType = list_createList ( ) ; list_t * localVarContentType = NULL ; char * localVarBodyParameters = NULL ; long sizeOfPath = strlen ( " " ) + 1 ; char * localVarPath = malloc ( sizeOfPath ) ; snprintf ( localVarPath , sizeOfPath , " " ) ; long sizeOfPathParams_organization = strlen ( organization ) + 3 + strlen ( pipeline ) + 3 + strlen ( " " ) ; if ( organization == NULL ) { goto end ; } char * localVarToReplace_organization = malloc ( sizeOfPathParams_organization ) ; sprintf ( localVarToReplace_organization , " " , " " ) ; localVarPath = strReplace ( localVarPath , localVarToReplace_organization , organization ) ; long sizeOfPathParams_pipeline = strlen ( organization ) + 3 + strlen ( pipeline ) + 3 + strlen ( " " ) ; if ( pipeline == NULL ) { goto end ; } char * localVarToReplace_pipeline = malloc ( sizeOfPathParams_pipeline ) ; sprintf ( localVarToReplace_pipeline , " " , " " ) ; localVarPath = strReplace ( localVarPath , localVarToReplace_pipeline , pipeline ) ; list_addElement ( localVarHeaderType , " " ) ; apiClient_invoke ( apiClient , localVarPath , localVarQueryParameters , localVarHeaderParameters , localVarFormParameters , localVarHeaderType , localVarContentType , localVarBodyParameters , " " ) ; if ( apiClient -> response_code == 200 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 401 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 403 ) { printf ( " \n " , " " ) ; } cJSON * BlueOceanAPIlocalVarJSON = cJSON_Parse ( apiClient -> dataReceived ) ; if ( ! cJSON_IsArray ( BlueOceanAPIlocalVarJSON ) ) { return 0 ; } list_t * elementToReturn = list_createList ( ) ; cJSON * VarJSON ; cJSON_ArrayForEach ( VarJSON , BlueOceanAPIlocalVarJSON ) { if ( ! cJSON_IsObject ( VarJSON ) ) { } char * localVarJSONToChar = cJSON_Print ( VarJSON ) ; list_addElement ( elementToReturn , localVarJSONToChar ) ; } cJSON_Delete ( BlueOceanAPIlocalVarJSON ) ; cJSON_Delete ( VarJSON ) ; if ( apiClient -> dataReceived ) { free ( apiClient -> dataReceived ) ; apiClient -> dataReceived = NULL ; apiClient -> dataReceivedLen = 0 ; } list_freeList ( localVarHeaderType ) ; free ( localVarPath ) ; free ( localVarToReplace_organization ) ; free ( localVarToReplace_pipeline ) ; return elementToReturn ; end : free ( localVarPath ) ; return NULL ; }
Retrieve queue details for an organization pipeline
Retrieve queue details for an organization pipeline
// create the path // Path Params // Path Params //produces //nonprimitive container // return 0; //return type