The getClickwrapAgreements call is not returning a list of documents associated with that agreement. According to the API documentation, this call should return a documents array of objects containing e.g. documentBase64, documentName, fileExtension, but that array is always empty.
Example request:
https://demo.docusign.net/clickapi/v1/accounts/<accountid>/clickwraps/<clickwrapId>/users?client_user_id=<userId>
Example response:
{
"userAgreements": [
{
"accountId": "<accountId>",
"clickwrapId": "<clickwrapId>",
"clientUserId": "<userId>",
"agreementId": "<agreementId>",
"documents": [],
"createdOn": "2020-09-25T11:30:26.8230097Z",
"agreedOn": "2020-09-25T11:30:34.5580771Z",
"status": "agreed",
"versionId": "e90d4cb6-868b-48a3-9b1c-5a7f2083102d",
"versionNumber": 8,
"settings": {
"hasDeclineButton": false,
"actionButtonAlignment": "left",
"mustRead": false,
"mustView": false,
"requireAccept": false,
"downloadable": true,
"sendToEmail": false,
"brandId": "68cbc4b1-a78f-4e72-889e-0554141da176",
"format": "inline",
"documentDisplay": "document"
}
}
],
"beginCreatedOn": "2019-01-01T00:00:00Z",
"page": 0,
"pageSize": 40,
"minimumPagesRemaining": 0
}
When I navigate to the Manage Clickwraps page in the Docusign website, I'm able to download the certificate associated with the agreement. If I enabled the recipient to download the agreement, they are also able to download it after agreeing.
For context, I need to store a copy of every user's agreement certificate in the back end.
Thank you for reporting this. This appears to be a bug with Clickwraps -- which I will report internally to have addressed. In the meantime, I was able to reproduce this issue, and can confirm that the document nodes are indeed coming back blank if hitting the user agreement in any form.
However, I was able to find this: In the call you're already making, you can see in the response there's parameter for agreementId. I did some tinkering and found that if I hit this URI:
"https://demo.docusign.net/clickapi/v1/accounts/{ACCOUNTID}/clickwraps/{clickwrapID}/agreements/{agreementId}/download?include_coc=true", I was able to download the PDF associated with that agreement. The url parameter for include coc determines if the additional certificate of completion is added onto the PDF.
Related
Is this possible somehow to get a file history (all related changesets) with API request if the file was branched or/and renamed?
For example, if I need to find a history of the object in Azure DevOps UI I can search this object in the project, in a certain path like this:
And if I need to find the first appearance of the object in a repository, I can get it by expanding a "branch and rename" history
There is a need to get this information via API requests.
I had tried to find some API requests which can do it, but found only the requests which can return only the changesets which are on the first picture, where the object has the same name and is located under the path defined in the search parameter - there is no information about renaming/branching operations.
GET https://dev.azure.com/Contoso/_apis/tfvc/changesets?api-version=6.0&searchCriteria.itemPath=$/Contoso/Trunk/Main/Metadata/Application_Ext_Contoso/Application_Ext_Contoso/AxSecurityPrivilege/Entity.xml
returns only 3 changesets - 2162, 2161, 391
POST https://dev.azure.com/Contoso/Contoso/_api/_versioncontrol/history?api-version=6.0
With the body request
{
"repositoryId":"",
"searchCriteria":"{\"itemPaths\":[\"$/Contoso/Trunk/Main/Metadata/Application_Ext_Contoso/Application_Ext_Contoso/AxSecurityPrivilege/Entity.xml\" ], \"followRenames\" : true ,\"top\":50}",
"includeSourceRename" : true
}
Also returns only 3 changesets, it only finds a specific item path, I tried to experiment with includeSourceRename and followRenames , but they do not work as I expected.
POST https://almsearch.dev.azure.com/Contoso/Contoso/_apis/search/codesearchresults?api-version=6.0-preview.1
with the body
{
"searchText": "Entity.xml",
"$skip": 0,
"$top": 25,
"filters": {
"Project": [
"Contoso"
],
"Repository": [
"$/Contoso"
],
"Path": [
"$/Contoso/"
]
},
"$orderBy": [
{
"field": "filename",
"sortOrder": "ASC"
}
],
"includeFacets": true
}
Also returns information only about 3 changesets.
Are there some approaches to get this information from the API request?
Two Requirements are needed:
Get item path of the document in a BIM360 document management.
Get all custom attributes for that item.
For Req. 1, an api exists to fetch and for getting custom attributes, another api exists and data can be retrived.
Is there a way to get both the requirements in a single api call instead of using two.
In case of large number of records, api to retrieve item path is taking more than an hour for fetching 19000+ records and token gets expired though refesh token is used, while custom attribute api processes data in batches of 50, which completes it in 5 minutes only.
Please suggest.
Batch-Get Custom Attributes is for the additional attributes of Document Management specific. While path in project is a general information with Data Management.
The Data Management API provides some endpoints in a format of command, which can ask the backend to process the data for bunch of items.
https://forge.autodesk.com/en/docs/data/v2/reference/http/ListItems/
This command will retrieve metadata for up to 50 specified items one time. It also supports the flag includePathInProject, but the usage is tricky and API document does not indicate it. In the response, it will tell the pathInProject of these items. It may save more time than iteration.
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "commands",
"attributes": {
"extension": {
"type": "commands:autodesk.core:ListItems",
"version": "1.0.0" ,
"data":{
"includePathInProject":true
}
}
},
"relationships": {
"resources": {
"data": [
{
"type": "items",
"id": "urn:adsk.wipprod:dm.lineage:vkLfPabPTealtEYoXU6m7w"
},
{
"type": "items",
"id": "urn:adsk.wipprod:dm.lineage:bcg7gqZ6RfG4BoipBe3VEQ"
}
]
}
}
}
}
Get item path of the document in a BIM360 document management.
Is this question about getting the hiarchy of the item? e.g. rootfolder>>subfolder>>item ? With the endpoint, by specifying the query param includePathInProject=true, it will return the relative path of the item (pathInProject) in the folder structure.
https://forge.autodesk.com/en/docs/data/v2/reference/http/projects-project_id-items-item_id-GET/
"data": {
"type": "items",
"id": "urn:adsk.wipprod:dm.lineage:xxx",
"attributes": {
"displayName": "my-issue-att.png",
"createTime": "2021-03-12T04:51:01.0000000Z",
"createUserId": "xxx",
"createUserName": "Xiaodong Liang",
"lastModifiedTime": "2021-03-12T04:51:02.0000000Z",
"lastModifiedUserId": "200902260532621",
"lastModifiedUserName": "Xiaodong Liang",
"hidden": false,
"reserved": false,
"extension": {
"type": "items:autodesk.bim360:File",
"version": "1.0",
"schema": {
"href": "https://developer.api.autodesk.com/schema/v1/versions/items:autodesk.bim360:File-1.0"
},
"data": {
"sourceFileName": "my-issue-att.png"
}
},
"pathInProject": "/Project Files"
}
or if you may iterate by the data of parent
"parent": {
"data": {
"type": "folders",
"id": "urn:adsk.wipprod:fs.folder:co.sdfedf8wef"
},
"links": {
"related": {
"href": "https://developer.api.autodesk.com/data/v1/projects/b.project.id.xyz/items/urn:adsk.wipprod:dm.lineage:hC6k4hndRWaeIVhIjvHu8w/parent"
}
}
},
Get all custom attributes for that item. For Req. 1, an api exists to fetch and for getting custom attributes, another api exists and data can be retrived. Is there a way to get both the requirements in a single api call instead of using two. In case of large number of records, api to retrieve item path is taking more than an hour for fetching 19000+ records and token gets expired though refesh token is used, while custom attribute api processes data in batches of 50, which completes it in 5 minutes only. Please suggest.*
Let me try to understand the question better. Firstly, two things: Custom Attributes Definitions, and Custom Attributes Values(with the documents). Could you clarify what are they with 19000+ records?
If Custom Attributes Definitions, the API to fetch them is
https://forge.autodesk.com/en/docs/bim360/v1/reference/http/document-management-custom-attribute-definitions-GET/
It supports to set limit of each call. i.e. the max limit of one call is 200, which means you can fetch 19000+ records by 95 times, while each time calling should be quick (with my experience < 10 seconds). Totally around 15 minutes, instead of more than 1 hour..
Or at your side, each call with 200 records will take much time?
If Custom Attributes Values, the API to fetch them is
https://forge.autodesk.com/en/docs/bim360/v1/reference/http/document-management-versionsbatch-get-POST/
as you know, 50 records each time. And it seems it is pretty quick at your side with 5 minutes only if fetch the values of 19000+ records?
I am using typescript,and the Contentful-ManagementAPI (that's the reason I'm not using the SDK client), and I want to retrieve all entries from a specific type. I am calling th Api like this:
axios.get("https://api.contentful.com/spaces/" +
space_id +
"/entries?content_type=" +
content_type+"&include="+2)
I am receiving all the entries requested, but in the image field I am getting this:
poster:en-US:
sys:
{type: "Link", linkType: "Asset", id: "222xxm9aaAu4GiAc2ESw0Q"}
So, How could I get the image URL?
I would appreciate any help. Thanks
From the Contentful docs:
The CMA does not support the include and locale parameters.
So, I might be better using the delivery api for retrieve content, and the management api for create/update/delete. That's the way it should be used.
The referenced assets and entries can be found in the includes object in the API response.
The response should look something like this:
{
"sys": {
"type": "Array"
},
"total": 9,
"skip": 0,
"limit": 100,
"items": [ // Your items here ],
"includes": {
"Asset": [ // Your included assets here, this is where you find the url to the image ]
"Entry": [ // Any referenced entries not included in the items array above ]
}
So to find the actual asset that includes all your data (including the url) you would have to find the correct asset, using the id of the reference (222xxm9aaAu4GiAc2ESw0Q), in the includes.Asset object.
Try include=10, If you are using multi locales provide fallback for each locale.
This worked for me.
I have setup my application to consume the content deliver API using the contentful SDK, its all hunky dory untill now when i realized the fieldType for each field in the content model is missing in the API response.
Am i missing something? I am providing more details about the API and its response below -
API response
The issue is if i dont know the the field type, i would have to ask the content writers to stick to a specific template and order of the fields instead of rendering the fields dynamically as you parse the response.
Please help!
You do not get the field types in the response, but you do get the content type id. It is expected that you already know what type of fields a specific content type contains.
The content type id can be found in the sys.contentType.sys.id property of each entry. With this information you could select which template to render.
If you still need to dynamically decide how to render based on the type of a field you would have to resort to the typeof operator to check what the type of each field is. You would lose out on the possibility to differentiate between specific Contentful properties though as they would all be returned as object.
You could also call the content type endpoint to fetch the entire content model from the Contentful API. http://cdn.contentful.com/spaces/space-id/content_types/
This would give you a the field each content type contains and the type of each field in the following structure:
{
"sys": {
// sys properties
},
"displayField": "productName",
"name": "Product",
"description": null,
"fields": [
{
"id": "productName",
"name": "Product name",
"type": "Text",
"localized": true,
"required": true,
"disabled": false,
"omitted": false
},
{
"id": "slug",
"name": "Slug",
"type": "Symbol",
"localized": false,
"required": false,
"disabled": false,
"omitted": false
},
// further fields
]
}
It would result in multiple API calls to get the information you want though.
I am using GitLab API v3 to do some operations on my private installation. Using private_token in GET URL is working fine. e.g.
GET http://git.example.com/api/v3/projects?=private_token=xyz123
But in order to make this possible, you need a private_token. There is one sure way to get it - from your account settings. But I want my users to use their email id/ login id and password to retrieve the private key and use it from there for rest of the operations.
I used following GET url and it is doing nothing for me:
GET http://git.example.com/api/v3/session?login=xyzuser&password=xyzpassword
Ideally as per GitLab documentation, I should get a JSON as follows -
{
"id": 1,
"username": "john_smith",
"email": "john#example.com",
"name": "John Smith",
"private_token": "dd34asd13as",
"blocked": false,
"created_at": "2012-05-23T08:00:58Z",
"bio": null,
"skype": "",
"linkedin": "",
"twitter": "",
"dark_scheme": false,
"theme_id": 1,
"is_admin": false,
"can_create_group" : true,
"can_create_team" : true,
"can_create_project" : true
}
If I get this, I can get private_token and work from there.
What am I doing wrong?
You need to POST the data as stated in the api (http://api.gitlab.org/session.html).
Be aware that if you do this action on a http port (instead of using https) that the password is send in plain text to the server.