我正在探索docusign API。 我试图了解状态API
是否可以实现以下功能是否可以请求一组信封ID的状态。我已经看到了申请ONE信封id状态的文档。
感谢您阅读
答案 0 :(得分:2)
是的,您可以通过DocuSign API轻松请求一组信封的状态。我建议您浏览DocuSign Developer Center,其中介绍了API Explorer中的工具以及“入门”部分中的API演练。
在这里查看第5(中)步骤,标题为获取信封状态 - http://iodocs.docusign.com/apiwalkthroughs
演练向您展示了6种语言(PHP,Java,Javascript,C#,Python,Objective-C)的api调用,以获取一组信封的状态。使用URL参数,您可以按状态和日期进行过滤。
您需要进行的API调用是:
方式强>
GET
<强> URI 强>
/accounts/{accountId}/envelopes
可选网址参数
如前所述,from_date需要进行URL编码。例如,要过滤自2014年3月1日以来发送,传递或完成的所有信封,您需要将以下内容附加到URL:
/envelopes?from_date=3%2F1%2F2014&status=sent,delivered,completed
答案 1 :(得分:2)
是DocuSign允许retrieving statuses for multiple envelopes。
但是,我实际上发现上述文档不准确并且缺少一些信息。 HTTP方法应为envelope_ids
,参数应命名为GET /accounts/{accountId}/envelopes/status?envelope_ids=abc,def
。
这样就会给你一个例子查询:
class GLWidget(QtOpenGL.QGLWidget):
def __init__(self, parent=None):
self.parent = parent
QtOpenGL.QGLWidget.__init__(self, parent)
self.current_position = 0
def initializeGL(self):
self.initGeometry()
self.vertex_code = """
#version 120
attribute vec4 color;
attribute float x_position;
attribute float y_position;
varying vec4 v_color;
void main()
{
gl_Position = vec4(x_position, y_position, 0.0, 1.0);
v_color = color;
} """
self.fragment_code = """
#version 120
varying vec4 v_color;
void main()
{
//gl_FragColor = v_color;
gl_FragColor = vec4(1,1,1,1);
} """
## Build and activate program
# Request program and shader slots from GPU
self.program = GL.glCreateProgram()
self.vertex = GL.glCreateShader(GL.GL_VERTEX_SHADER)
self.fragment = GL.glCreateShader(GL.GL_FRAGMENT_SHADER)
# Set shaders source
GL.glShaderSource(self.vertex, self.vertex_code)
GL.glShaderSource(self.fragment, self.fragment_code)
# Compile shaders
GL.glCompileShader(self.vertex)
GL.glCompileShader(self.fragment)
# Attach shader objects to the program
GL.glAttachShader(self.program, self.vertex)
GL.glAttachShader(self.program, self.fragment)
# Build program
GL.glLinkProgram(self.program)
# Get rid of shaders (not needed anymore)
GL.glDetachShader(self.program, self.vertex)
GL.glDetachShader(self.program, self.fragment)
# Make program the default program
GL.glUseProgram(self.program)
# Create array object
self.vao = GL.glGenVertexArrays(1)
GL.glBindVertexArray(self.vao)
# Request buffer slot from GPU
self.x_data_buffer = GL.glGenBuffers(1)
GL.glBindBuffer(GL.GL_ARRAY_BUFFER, self.x_data_buffer)
GL.glBufferData(GL.GL_ARRAY_BUFFER, ArrayDatatype.arrayByteCount(self.x), self.x, GL.GL_DYNAMIC_DRAW)
self.y_data_buffer = GL.glGenBuffers(1)
GL.glBindBuffer(GL.GL_ARRAY_BUFFER, self.y_data_buffer)
GL.glBufferData(GL.GL_ARRAY_BUFFER, ArrayDatatype.arrayByteCount(self.y), self.y, GL.GL_DYNAMIC_DRAW)
## Bind attributes
#self.stride = self.x.strides[0]
#self.offset = ctypes.c_void_p(0)
self.loc = GL.glGetAttribLocation(self.program, "x_position".encode('utf-8'))
GL.glEnableVertexAttribArray(self.loc)
GL.glBindBuffer(GL.GL_ARRAY_BUFFER, self.x_data_buffer)
GL.glVertexAttribPointer(self.loc, 1, GL.GL_FLOAT, GL.GL_FALSE, 0, 0)
#self.stride = self.y.strides[0]
#self.offset = ctypes.c_void_p(0)
self.loc = GL.glGetAttribLocation(self.program, "y_position".encode('utf-8'))
GL.glEnableVertexAttribArray(self.loc)
GL.glBindBuffer(GL.GL_ARRAY_BUFFER, self.y_data_buffer)
GL.glVertexAttribPointer(self.loc, 1, GL.GL_FLOAT, GL.GL_FALSE, 0, 0)
def resizeGL(self, width, height):
if height == 0: height = 1
GL.glViewport(0, 0, width, height)
GL.glMatrixMode(GL.GL_PROJECTION)
GL.glLoadIdentity()
aspect = width / float(height)
GLU.gluPerspective(45.0, aspect, 1.0, 100.0)
GL.glMatrixMode(GL.GL_MODELVIEW)
def paintGL(self):
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
GL.glDrawArrays(GL.GL_LINE_STRIP, 0, self.bins)
def initGeometry(self):
self.bins = 1000
self.x = np.linspace(-0.5,0.5,self.bins)
self.y = np.array([np.sin(val*2*np.pi) for val in self.x])
self.color = np.array([(1,1,1,1) for x in np.arange(self.bins)])
def addPoint(self, point):
#print('ADD POINT')
self.y[self.current_position] = point
if self.current_position < self.bins-1:
self.current_position += 1
else:
self.current_position = 0
return True
def render(self):
#print('RENDER')
self.updateGL()
return True
响应包含标准的DocuSign分页字段,但如果包含在请求中,它们似乎不会被处理。在文档中没有提到一次可以检索的最大包络数。